3

I'm trying to figure out how to approach building an application with reactJS as my client side javascript framework and NOT NodeJS on my server side.
My routing is delivered only by server right now and I want to involve some functionality with react on my client side which will involve the react router.
I think that it is important to say that I don't care here about SEO.
So the question is what is the better approach? to distribute the app to some smaller pieces of react app? or wrap my app with big react app and always use only chunks of it's functionality? I'm afraid that when I use a big wrapper app I do some more coupling which I'll pay for that later when I will need to separate things.
Hope it is not too abstract. thank you :)

edit: I don't talk about reactJS especially, this is an abstract question about separation of server and client sides.

2
  • 1
    it depends how much react you are planning on using! I would recommend using small bit of react in your website rather than building the entire UI with it Commented Nov 15, 2015 at 10:42
  • right now I don't have react at all, I have only jquery to handle the ui events and data. as my data in the app grows and new features developed I want to have some data structure that arranges my data in one place and let me play with it without worries on affecting other events/data. So I decided to give React a chance, (because I'm familiar more with angular and this is a good chance to learn other framework). so basically what you say is to translate my app to React by small chunks and this is very easy with react. thanks! Commented Nov 15, 2015 at 11:15

1 Answer 1

1

So the question is what is the better approach? to distribute the app to some smaller pieces of react app? or wrap my app with big react app and always use only chunks of it's functionality?

So you'll have more than one single-page-application. Assuming you'll have mobile users, you'll have to make decisions based on the js file sizes vs the number of network requests all while being mindful of browser caching. If some routes are rarely used, maybe it makes sense to separate those out into their own js file. I'd start with small pieces. You can always combine them later.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your suggestion, very apriciate it. This application is only for the use of the admin so I guess I don't really have to take traffic into consideration. And the app will be used on desktop browsers only, at least for the closer time. One of the things I love in react is that you really can start with small pieces and later combine them pretty smoothly. Thanks for the advise

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.