This project was bootstrapped with Create React App.
https://jakearchibald.com/2016/caching-best-practices/
<
https://create-react-app.dev/docs/analyzing-the-bundle-size/
https://www.kaliop.com/fr/react-js-reduire-son-bundle-javascript-avec-du-code-splitting/
- yarn analyze with source-map-explorer
yarn add source-map-explorer
Add in package.json:
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
...
}On peut ensuite lancer les commandes :
yarn build
yarn analyze
- Suspense & lazy import
const LazyComponent = React.lazy(()=> import('./something'))
[...]
<Suspense fallback={<span>Loading...</span>}>
<LazyComponent >
</Suspense>- Loadable components
https://loadable-components.com/docs/getting-started/
`yarn add @loadable/component``
'lodash' is an available library in CRA. Only needed to include the desired import: import 'sortBy' from "lodash/sortBy".
With the conflict of Ruby's serve', we use static-server to run the build file from the folder '\build.
https://www.npmjs.com/package/static-server
Works only in 'build' mode.
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
https://realfavicongenerator.net/favicon_result?file_id=p1ei367ann14qd3bm1654a6b4v36#.X13MVpMzYWo
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
https://github.com/cloudinary/cloudinary-react https://cloudinary.com/documentation/react_integration
Run 'react-starter-kit' generated from https://github.com/kriasoft/react-starter-kit/blob/master/docs/getting-started.md to get example.
https://learnwithparam.com/blog/how-to-pass-props-to-state-properly-in-react-hooks/
https://learnwithparam.com/blog/how-to-pass-props-in-react-router/