Hello,
I try a new project with Plain React using CodeGen.
I create plasmicHost component with a react-rooter.
Here’s the code
index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
main.tsx
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App/>
</StrictMode>
)
App.tsx
import {Route, Routes, BrowserRouter} from 'react-router-dom';
import PlasmicHost from './plasmic-host';
function Toto() {
return <div>Hello world</div>;
}
function App() {
return (
<BrowserRouter>
<Routes>
<Route path="/plasmic-host" element={<PlasmicHost />} />
<Route path="/" element={<Toto />} />
</Routes>
</BrowserRouter>
);
}
export default App;
And I launch the code gen part and link to plasmic.
I’va a trouble in the editor.
Have you ever encountered this problem?
I have another project for which I don’t have any issues like this.
Thks in advance