ShakaCode | ShakaCode Blog | Rails On Maui Blog | Rails | ReactJs | JavaScript | Webpack | Productivity |

Custom client file structure


#1

Hey I find what you do very neat and nice so I would like to start using react_on_rails for my projects.

The problem is I like my file structure more component oriented, what I mean is I prefer having a folder with a component or container and inside this folder have everything I need for this specific element, such as css tests reducer constants actions.

Any idea how I could do that please?

Best,
Christos


#2

@paschalidi, please be more specific with a proposed directory structure. You can probably do what you want under the /client directory.


#3

Hey @justin thanks for you response.

I will describe the problem in detail.
I want to use react_on_rails with an existing reactJS framework that is being called react-boilerplate, it’s a cool framework I have been using for a while and really makes things easier in the long term. react-boilerplate

The thing is the file structure this boilerplate is using is quite different that the approach of react_on_rails, I also read the docs of react_on_rails on github that “React On Rails does not enforce a specific project structure” which is very cool, but I havent found anywhere a way to change the default file structure. github docs

Would be nice if you could help me and advice me how to start tackling this.
I am willing to take notes of my steps so that you can upload this in react_on_rails documentation. I believe the more popular react_on_rails will go the more this problem might arise.

Let me know your thoughts @justin .

Best,
Christos


#4

Hi Christos,

You are 100% able to organize the /client directory as you choose.

Please consider enrolling in ShakaCode’s Coaching Plan where we can give you personalized help to setup your project the way you wish.

Thanks,

Justin