Closed jtorjo closed 5 years ago
Hey @jtorjo - sorry for the (very) late reply. Pushing a new URL onto your router will not call the server. If you want to call the server, you need to reload the page. Server-side rendering works like this:
Hope that helps!
Some of my pages need to be always executed on the server side. Initially I thought this was the case, but a lot of the requests are handled on the client side.
I'm using your template, I modified it a bit. Having said that, I thought that dispatch(push (new_url)) would force a trip to the server:
Do I need to change the router? I know I'm using this in loader.js: import { StaticRouter } from 'react-router';
Would changing that make any difference, or do I need to do something inside express() ?