Closed RyanMarten closed 4 years ago
Yo this is sick Thanks!
I'll start using this instead of coding from scratch!
Argon looks the nicest:
If you clone the repo and try to yarn install and yarn start, the website doesn't work: You need to do the fix as described in this stack overflow post: https://stackoverflow.com/questions/60234640/typeerror-err-invalid-arg-type-the-path-argument-must-be-of-type-string-re
Overwrite the existing "react-scripts": "^3.x.x" with"react-scripts": "^3.4.0" in your package.json Delete your node modules Run npm install or yarn install
I have it running locally. Now I will try to add the files to the dreamtune repo under the react_dashboard branch
https://www.tawesoft.co.uk/kb/article/mit-license-faq still have to include the copyright notice
Copied over the files. Had to use a .env file to get the absolute imports to work: https://medium.com/@ktruong008/absolute-imports-with-create-react-app-4338fbca7e3d
use the react_dashboards branch and npm start. You will see the dashboard at localhost:3000/admin
I don't think I can just use Jest anymore. Im going to look at Mocha and enzyme
Critical here is the shallow render. So it just renders that component, not any children components. Key!
ICONS.JS can be refactored with a simple mapping function (e.z. p.z. --> will become <100 lines of code rather than 3000)
Same deal with Tables.js
Fixing these two files will bring the coverage wayyyyyyyy back up
Returning multiple components in a single render jsx: https://flaviocopes.com/jsx-return-multiple-elements/
The fragment didn't work for me, but the array did
Test coverage is now at 41.42%!!!!! with the refactor!
https://dev.to/sm0ke/react-dashboards-open-source-apps-1c7j
We should be looking to use more react components to help build our app out more.