hooks (the custom hooks with the business logic: dispatch to redux, get data, ecc)
layout (the wrap components that define the layout of the page)
models (typescript interface)
slices (createSlice for redux toolkit)
store (the store of redux)
view (contains the pages of the routing with layout and components)
How to you think about this structure?
All of components are in functional component, and the component in general is only for HTML and for call a custom hooks to get the business logic.
Yup, sometimes I changed my containers folder to pages folder and all my pages or screen related components sits there. And all of the reusable components are located inside components folder. Ex:
I used this structure:
How to you think about this structure?
All of components are in functional component, and the component in general is only for HTML and for call a custom hooks to get the business logic.
hey, my dear friend, have you tried concent? that will make state management much easier than u experienced before.
No, I always used Redux.
Now with Toolkit, Redux is very simple.
In the last month I tried RecoilJS (by Facebook).
Thanks for your advice, I will try to us concetjs!
big thx, u just need one min to read its quick start and then know how funny it is 😀
I think this is the same as my setup with just additional folders.
That's how I managed my react folder
react-file-structure.surge.sh/
Totally agree, If it doesn't give you frustration I think it's in the right place.
Actually every-time I ended with similar structure as you shown.
I like this style structure, but what the different point is I put all component to folder
componentshere is my folder structure example.
I love this setup also.
sometimes i prefer add a pages floder, the pages components in their floder, common components save in globals components floder
about the code save way.
some util code not too much reuse, how to use save those utils code in your project?
Yup, sometimes I changed my
containersfolder topagesfolder and all my pages or screen related components sits there. And all of the reusable components are located insidecomponentsfolder. Ex:Too much