Simple, I really got tired of setting up a structure for every react project I make, which lead into the birth of this little boilerplate code, here's what's included in it:
- TypeScript
- Sass (global styles and module styles)
- MobX + MobX State Tree π₯°
- Apisauce
This template takes heavily from Ignite CLI's boilerplate for React Native in terms of used tech and file structure
ibrahimelaradi
/
react-template
Template for developing react app with structure inspired by Ignite CLI's react native boilerplate
A react template heavily inspired by Ignite CLI's boilerplate for React Native, it uses a couple of generators with simple template customization.
Used Tech
-
TypeScript
π₯° - Mobx State Tree for state management
- ApiSauce as an api client
-
React Router V6 for routing
β β
Project Structure
src
ββββapis
β ββββbase // The base API that can be extended to implement clients
β ββββpokemon // Example of extending the base API
ββββassets // Project assets
ββββcomponents // Components folder
β ββββpokemon-card // Example, generated by "yarn g component pokemon-card"
ββββmodels // Mobx models folder
β ββββextensions // Extensions to be used in mobx models
β ββββpokemon // Example, generated by "yarn g model pokemon"
β ββββroot-store // The root of the mobx store
ββββpages // Pages folder
β ββββpokemon-list // Example, generated by "yarn g page pokemon-list"
ββββrouter // Router definition folder
ββββstyles // Global styles
ββββui // UI components folder
β¦I'm currently working on a full example usage that will explain some of the concepts used in this project, until then, feel free to check out the repo on Github, any suggestions/contributions are very welcome!
Top comments (0)