Use colon and comma invite + react in createBrowserRouter
P粉165522886
P粉165522886 2023-09-06 23:36:47
0
1
321

Hi, I've been searching but couldn't find any similar question. The server I'm using is running, but it's not working as expected from the tutorial I'm following.

I'm using the latest versions of vs code, xampp, composer, Laravel, nodejs and npm, so here's the code:

import {createBrowserRouter} from "react-router-dom";

//指定路由
const router = createBrowserRouter(routes: [])
export default router;

The colon before routes (routes:) has an underline in red and displays "expected ','". I'm following this video https://youtu.be/qJq9ZMB2Was, at about 23:02.

Thank you very much for your help, I am still learning and am a beginner in this field.

should not be underlined in red.

P粉165522886
P粉165522886

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!