- npx create-react-app my-app
Creating a TypeScript app# You can start a new TypeScript app using templates. To use our provided TypeScript template, append --template typescript to the creation command.
- npx create-react-app my-app --template typescript
npm start or yarn start
npm test or yarn test
npm run build or yarn build
- npm i -g html-to-react-components
- add data-component="component-name" to all tags that you want to convert to a component.
- Open terminal and write path of your html => html2react "./html/index.html" - if you have more than index.html, multi way to make component => html2react "./src/*.html"
- npm install node-sass or yarn add node-sass
- Rename .css to .scss
- @import './sass/main.scss';
- Error: Node Sass version 5.0.0 is incompatible with ^4.0.0
- npm uninstall node-sass
- npm install [email protected] Or
- yarn remove node-sass
- yarn add [email protected]
npm install react-router-dom or yarn add react-router-dom
- then change all <a href="#" to <Link to="/".
- You need to change all url OR just move fonts folder to "scss" folder.
- roman01la