eklem / draw-at-work

Templates and tools for workshops to learn how to draw to communicate. Not art, communication. Everyone can. Doesn't need to be pretty. Communicate better within teams and stakeholders.
MIT License
2 stars 0 forks source link

Add types for router #17

Closed eklem closed 3 months ago

eklem commented 3 months ago

https://reactrouter.com/en/main/routers/create-browser-router

eklem commented 3 months ago

The error message I get in VSCode for this code is:

Could not find a declaration file for module './routes/root'. '/Users/eklem/github_modules/draw-at-work/react/src/routes/root.jsx' implicitly has an 'any' type.ts(7016)
eklem commented 3 months ago

Try with react-ts scaffold through Vite as a start, then add routes libraries (actual library + types) and the 4 routes.

eklem commented 3 months ago

Creating react-ts with Vite instead of transforming react to react-ts seemd to do the trick.