Hey everyone. Most of my experience is with nodeJS + express, and on the front end Angular 2 and ReactJS. I’m building out a multi page site similar to Quora, Github, or Yelp, Foursquare, etc. I have only ever worked with SPA before, and even though I have experience with angular-universal and server side rendering with react, I am wondering for this particular use case… do I even need React? Please bear with me while I try to explain and I am hoping that you guys and girls might have some experience (I’m fairly new to web dev!) to share.
My front end routes are fairly simple
-
/explore/:location
for a nice google maps + results list for things in your area. This is my core basically.
-/user/:name
for user profiles
-/groups/:name
for groups
-/events/:name
for events
I had built out the backend using nodeJS + express + postgres, and it is deployed on AWS.
I have built a front end POC with server side rendered react + redux. I need server side rendering here because I am making use of geolocation to serve users with results in their current location (or close to them). I am using redis for caching, so I have a bunch of HTML pages by location cached and which can be updated as the data stores update. I’m only doing this for indexing reasons and also because I think its cool. It is possible I am doing this totally incorrectly, but like I said its just me and I’m new to this.
The issue here is that even with lots of code splitting and a webpack config that makes me feel dizzy (even though I wrote it!), I am still really only making use of the things react offers on the /explore
map page. For the rest, I can probably avoid having to serve a 180kb gzipped js file that parses into a pretty big 670kb. Most of that is really only for the /explore
page…
What is your suggestion here? I am thinking of cutting out react completely, still using redux and using server side rendered redux states that can be used by my views. I can use jquery or something for any dom manipulation. Does that make sense?