question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and 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.

Screen Shot 2021-09-11 at 22 48 27

Your environment

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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

1reaction
lex111commented, Sep 11, 2021

@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.

0reactions
slorbercommented, Sep 22, 2021

Hey

Merged https://github.com/facebook/docusaurus/pull/5556 so please test and let us know if canary doesn’t fix the problems

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
My screen getting blank when i use mdx live editor.
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found