Just clone and rename to create your own React app
- typescript
- react v18 (with hooks)
- react-router
- react-hot-loader
- css-modules
- webpack
- jest
- @testing-library
-
In
transpileOnly
mode ofts-loader
, theTypescript
compiler will not generate declaration files, but you can generate them viatsc
. -
When using CSS Modules:
-
You should add a declaration file for e.g.
*.less
files, for example, less.d.ts. -
To make the Iconfont work properly with CSS Modules, you have to import the styles in the global scope:
:global { @import "~font-awesome/less/font-awesome.less"; }
-
-
While using react-router, you should use
withRouter()
as a function call instead of as a decorator (@withRouter
), becauseTypeScript
doesn't allow decorators to change the signature of the classes they are decorating.