ReactJS update component in response to URL change

Hi everybody,

I’m trying to get a ReactJS component (form) to update after a URL change. The URL change occurs after a user selects “new” from a navbar. I would thought I can see the URL change happening somewhere in the code, but I have only been able to find componentWillUpdate to see this, and I am unable to connect that to a state-change, thus leading to a read from the database. (And componentWillUpdate seems to be called every time anything happens…)
I’ve been trying to read tutorials and documentation online, but it seems all very contractory and/or outdated. This would seem to me to be a easy problem, but ReactJS has me banging against a wall. :frowning:

Thanks for any pointers!

Paul

you should use react-router: https://reacttraining.com/react-router/web/guides/quick-start