-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Live] optional chaining and null coalescing not supported #389
Comments
I forked your working sandbox and changed the version and it seems to be working. I'm not sure what the difference between the two sandboxes is. https://codesandbox.io/p/devbox/react-live-v3-optional-chaining-forked-nhdwhv |
did you restart the DEV server after changing the version? I had the same "experience" when forking from 4.x to 3.x. Not sure how tied react-live is with docusaurus, but the issue can be reproduced in their live docs too (they use react-live@4.1.6 too) and in their codesanboxes |
Interesting. I also see it doesn't work on the Docusaurus page, but it does work on our own docs page |
Indeed, cross-sharing my findings FWIW: facebook/docusaurus#9809 (comment) |
Only thing I see different, but IMO should not matter (?), is that your docs page and storybook and all local code is handled by or whatever is published to |
@childrentime said facebook/docusaurus#9809 (comment) & facebook/docusaurus#9809 (comment) It seems to be fixed in #383 (merged to but the latest version of this pkg is
but, Second: it seems we just need to release a new version to include #383 That would explain why it works for you (react-live) locally (storybook) and in your website: because it uses the code from |
mini update @childrentime - it works in your example because you use -```tsx live noInline
+```tsx live
function Demo() {
const arr = [1, 2, 3, 4, 5, 6];
@@ -32,10 +32,8 @@
</div>
);
};
-
-render(<Demo/>) So, yes, if the fix if #383 (and it seems it is, because it works in react-live docs site, we are missing to release a new version to include #383 |
Aha! That release got missed in our automation bc the changeset was not in the original merge. It's now released in https://github.com/FormidableLabs/react-live/releases/tag/react-live%404.1.7 |
thanks @carbonrobot ! I've installed |
Is there an existing issue for this?
Code of Conduct
Code Sandbox link
https://codesandbox.io/p/devbox/react-live-optional-chaining-q2qwy2?file=%2Fsrc%2FApp.tsx%3A4%2C1-17%2C2
Bug report
cannot use optional chaining (
something.foo?.bar
) nor null coalescing (?? ''
)Steps
This is the live code I'm trying to use:
Versions
Additional context
The same exact live code works fine in your Demo page 🤨
I even cloned this repository locally and tested the same exact code in your Storybook examples, and it works fine.
So, I'm not sure what is different from the version you have running in your demo versus what is published via
v4.1.6
Additional context
FWIW: the same exact code works fine in
react-live@3.2.0
, here the v3.2.0 codesandboxThe text was updated successfully, but these errors were encountered: