reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
11.07k stars 7.55k forks source link

[Bug]: 'Render React components anywhere on the page' sandbox does not work #6920

Open devserkan opened 5 months ago

devserkan commented 5 months ago

Summary

When you go to the relevant sandbox you see that it throws an error in the console. The problem occurs because there are two index.html files in the project. One in the project root directory and the other in the public directory. Simply replacing the one in the public directory with the one in the root directory solves the issue.

Page

https://react.dev/learn/add-react-to-an-existing-project#step-2-render-react-components-anywhere-on-the-page

Details

No response