Dima Gimburg
Dima Gimburg

Reputation: 1466

ReactJS as small distributed apps with no NodeJS server

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.

Upvotes: 3

Views: 437

Answers (1)

Rick Jolly
Rick Jolly

Reputation: 3009

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.

Upvotes: 1

Related Questions