ReactJS: How to do authentication?

Hey there!

So, I’m trying to have a look and understand ReactJS and the Flux architecture and it’s quite okay right now. But, since I’m a learning by doing and looking at examples kind of guy and there is nothing that could help me for my current issue… well.

So, how would I go about requiring login to show specific components using React? One thing that could work is using react-render-component and issuing the NotFound handler when there is no user token, but this isn’t the perfect solution since it shows NotFound for a valid URL. I would very much prefer rendering of a login component or showing an error message instead.

Is there any example for this that I might’ve missed or could you please point me in the right direction?