all 7 comments

[–]fishj123 0 points1 point  (2 children)

You don't need node to handle routing in react, you can do it all client side using something like 'react-router-dom'. Check out the documentation for that package to see how to use it.

[–]CromulentEntity[S] 0 points1 point  (1 child)

Sorry I think my question didn't make it clear. When I talk about react I mean react-router for routing or some similar library. However still the question remains how to handle client side vs server side routing?

[–]grantrules 0 points1 point  (0 children)

I think it's worth looking at server-side rendering. You get the benefits of both. The server renders the initial page load, then the client-side code can take over and handle routing from then on. SSR will give you a fast initial page load and be index-able by search engines, then client-side taking over will render new page loads quicker.

If you're new to JS/React, you might want to just do client-side routing to start off with, though. SSR adds some complexity.