Skip to content

Live editor render twice times on page first mount #2986

@cncolder

Description

@cncolder

🐛 Bug Report

Live editor render component twice times

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

  1. Paste code below into .mdx file
	```jsx live
	function Demo() {
    	React.useEffect(() => console.log('mount'), [])
    	return null
	}
	```

Expected behavior

log 'mount' one time

Actual Behavior

mount
mount

Your Environment

  • Docusaurus version used: 2.0.0-alpha.58
  • Environment name and version: Chrome 83
  • Operating system and version (desktop or mobile): macOS

Reproducible Demo

(Paste the link to an example repo, including a siteConfig.js, and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondifficulty: starterIssues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions