My screen getting blank when i use mdx live editor.
See original GitHub issue🐛 Bug Report
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io
- I have read the console error message carefully (if applicable)
Description
I try to use MDX using livecodeblock , everything is okay until I try to delete all code on the live editor and when i press delete one more time my screen getting blank and my console give me this code : Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
Have you read the Contributing Guidelines on issues?
Yes
Expected behavior
i can delete my code on the live editor.
Actual behavior
console code : Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
Your environment
- Public source code: https://github.com/fiqryq/fiqrychoerudin
- Public site URL: localhost / https://fiqrychoerudin.vercel.app/
- Docusaurus version used: 2.0.0-beta.6
- Environment name and version (chrome Version 93.0.4577.63 (Official Build) (x86_64) , Node.js 14.17.6 LTS):
- Operating system and version (Mac OS Big Sur 11.5.2):
Reproducible demo
Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.
(Paste the link to an example repo, including a docusaurus.config.js, and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12
Top Results From Across the Web
Navigation Screen Stays Black - Acura Enthusiast Community
I have a 2005 Acura RL and the navigation screen is just black. It appears that it is back lit still as it...
Read more >mdx-observable - npm
Start using mdx-observable in your project by running `npm i mdx-observable`. ... Usage outside MDX; Warning about blank lines in JSX.
Read more >export / import keywords break MDX runtime execution #581
Adding export to this pane throws SyntaxError: unknown: Unexpected token, expected "{" and breaks the whole page (it goes blank). Screen Shot ...
Read more >How I Built my Blog using MDX, Next.js, and React
In this article, I'm going to break down how my blog works, so that you can build something similar for yourself. I'll also...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ChristopherHButler thanks, but in your case, the problem with React version mismatch (you use v17, but the latest minor version react-live 2.3.0 rewritten on hooks uses v16). yarn can resolve this automatically, but npm you use doesn’t.
A workaround would be to downgrade React to v16/run app via yarn instead of npm/add webpack alias. But it would be better if we just use the previous version react-live 2.2.0. I created PR for this #5556.
Hey
Merged https://github.com/facebook/docusaurus/pull/5556 so please test and let us know if canary doesn’t fix the problems