-
Notifications
You must be signed in to change notification settings - Fork 1
What I've learned
Fred B edited this page Nov 24, 2020
·
9 revisions
- Not using libraries like
redux
andredux-sagas
for medium to large scale project is the same as shooting one's self in the foot- By trying to implement these myself, i've learned that they are not that complicated, but they have the advantage of being thorougly tested, so once less immense thing not to worry about. Being able to rely on the open-source community for this is one of the many foundational stones for a successful project.
- Use
Redux Toolkit
to avoid all the plainredux
boilerplate code. This has the advantage to still include the flux architecture, the stability ofredux
, while being able to be more flexible with regards to code maintenance and scalabilility. In addition, it automagically configures theredux
devtools Chrome extension, which is an incredible tool. - Use
NextJs
instead ofCreate React App
to bootstrap the project because of the isomorphic Javascript capabilities it brings, the ease to create new pages without having to configure any router. This tool grows along with the complexity of the project : it can be anywhere from simple to full-blown applications. Very versatile tool. - Well defined and stable specs are another foundational stone for a succesfull project outcome.
- Implement the Private Route pattern using the react-router-dom
- Feature-centered directory structure 👍, like it is right now, but for greater coder’s convenience, I would include the redux-related files into the corresponding feature directory. Right now, they do sit in their own feature directory, but are all sitting inside a
redux
directory, at root level. - Test-Driven Development is something I keep on putting to the side, although I periodically dive into the subject, for one day I will adopt the technique, I swear ;)