so i have been trying out solid and i keep having some issues with the router, one of which is the routes tag which i believe is in the older versions but i'm using the newer one and dont really wanna downgrade...
so this is my code:
index.jsx:
import { render } from 'solid-js/web'import { Router } from '@solidjs/router'import './styles/index.css'import App from './App.jsx'const root = document.getElementById('root')render(() => ( <Router> <App /> </Router>), root)`
import { render } from 'solid-js/web'import { Router } from '@solidjs/router'import './styles/index.css'import App from './App.jsx'const root = document.getElementById('root')render(() => ( <Router> <App /> </Router>), root)`
import { createSignal } from 'solid-js'import solidLogo from './assets/solid.svg'import viteLogo from '/vite.svg'import './styles/App.css'import Home from './pages/home'import Navbar from './components/navbar'// import Productie from './pages/productie'// import Over from './pages/over'// import Historiek from './pages/historiek'// import Contact from './pages/contact'import { Router, Route } from "@solidjs/router";function App() { return ( <> <Navbar /> <Route path="/" component={Home} /> {/* <Route path="/productie" component={Productie} /> <Route path="/over_ons" component={Over} /> <Route path="/historiek" component={Historiek} /> <Route path="/contact" component={Contact} /> */} </> )}export default App
import { createSignal } from 'solid-js'import solidLogo from './assets/solid.svg'import viteLogo from '/vite.svg'import './styles/App.css'import Home from './pages/home'import Navbar from './components/navbar'// import Productie from './pages/productie'// import Over from './pages/over'// import Historiek from './pages/historiek'// import Contact from './pages/contact'import { Router, Route } from "@solidjs/router";function App() { return ( <> <Navbar /> <Route path="/" component={Home} /> {/* <Route path="/productie" component={Productie} /> <Route path="/over_ons" component={Over} /> <Route path="/historiek" component={Historiek} /> <Route path="/contact" component={Contact} /> */} </> )}export default App
please help i keep getting this error:
utils.js?v=22cc6010:29 Uncaught Error: <A> and 'use' router primitives can be only used inside a Route.
utils.js?v=22cc6010:29 Uncaught Error: <A> and 'use' router primitives can be only used inside a Route.