Comments (7)
Can you publish the project in github and send link? or Mention the project structure.
from react-typescript-webpack-starter.
Please check out the repo at https://github.com/kentmz/react-setup
Also, some of the issues I faced was:
- When you navigate to a route and refresh the route, it gives an error saying "Cannot GET /dashboard". I fixed this my adding
output.publicPath = '/' and devServer.historyApiFallback = true
in webpack.
from react-typescript-webpack-starter.
Hi Kent,
-
For the 1st Thread:
- You should always add config files in the root. That's the standared almost all libraries follow.
- declarations file works fine some times. According the editors memory management. It could be trouble some. But you can
either restart TextEditor or only the Typescript server. [ ctrl + shift + p , restart typescript server ]. This would restart the lints
for default VsCode TS
-
For the recent Thread:
- For routing. I think you should pass the routable component as prop other than child. But If there's way. You should bend
your perspective little bit. But I'd recommend for your code. It's fine to pass the dashboard component to the Route
Component as a prop.
- For routing. I think you should pass the routable component as prop other than child. But If there's way. You should bend
for referance try these: Sample Router File
Please always pull from "vishwas" repo. Coz, he's constantly updating the setup.
from react-typescript-webpack-starter.
Hi,
Thanks for getting back on this. Appreciate it. I tried to move the tsconfig.json to the root. But now all my imports are giving error, example "Could not find a declaration file for module 'react-router-dom'. "
Appreciate your help on this.
Thanks.
from react-typescript-webpack-starter.
Yeah you missed some TypeScript packages.
Eg: @types/react-router-dom
, also try comment react-cookies. Since you only declared.
from react-typescript-webpack-starter.
Thanks a lot. This resolved the issue.
from react-typescript-webpack-starter.
Hi Kent,
If the Issue got rectified. Please close.
from react-typescript-webpack-starter.
Related Issues (8)
- Do you really need Babel here - Typescript can compile React JSX too! HOT 1
- ESLint couldn't find the config "prettier/@typescript-eslint" to extend from
- Unable to host project in local network
- how to avoid letting the packages deprecated?
- Issue Related To Production HOT 2
- Project builds successfully although type errors HOT 1
- TypeError: The 'compilation' argument must be an instance of Compilation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-typescript-webpack-starter.