A bit wide question, but with all those trends in JS world, sometimes it is hard to find information about such simple things. What is the better way to organize files and folders in such kind of project? There is server examples in few language from Facebook, but it is for very basic project.
Also find out React Examples on git
But those examples are just for playing around.
The goal is - to have clearly separate Client and Server component. Move them in separate trees of folders. Also have app-like structure (like for example Django does)
So main question is:
what is correct way to separate nodejs/iojs serveer side from React client side component and put it all together in one project?
Project:
There is no "best project architecture" that will fit with any project and coding style. But you should always structure your project. React doesn't follow any particular project structure, and the positive thing about this is that it allows us to make up a structure to suit our needs.
React-starter-kit is a really good isomorphic project template and also includes all necessary tools such as eslint, babel...etc. It's well-documented so you can know the purpose of each folder easily.
Before you build your project structure, you have to think if it's necessary to apply flux, and different flux or flux-inspired framework may make your structure different. React-starter-kit is a good place to start trying different implementations.
Basically you could start with any React.js boilerplates; look through it, and evaluate the problem in a few aspects
I compared a few react boilerplates and eventually go with isomorphic500. I revised me code a bit to reach something like this:
what is inside my src
folder is the modules you will be developing. To me it's easier to develop stuff if all the modules are decoupled and by doing this you can separate your work among your teammates, if any.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With