Rei Dien
Rei Dien

Reputation: 196

Isomorphic React with React Router with KOA

I would like to create an app in koa that would render react components when user hits the address bar, and after that a react-router client side to navigate through the links inside that rendered react component. is that possible? I want the initial load to be SEO friendly. i cant provide code yet but eager to listen to all of you suggestions and answers.

This will be the wanted flow:

User hits ther server (ex: localhost:3123/) --> KOA will render the react component that will be shown (this component has react router links on it) --> User navigate through the links (this time i dont want to hit the server again, so i want the react router on this side to trigger the routing.

It doesnt matter if the source code when routing through client side will not change, all i want to have is the source code of the initial react component when the user first hits the server. is this possible?

Upvotes: 0

Views: 1753

Answers (1)

Max Bumaye
Max Bumaye

Reputation: 1009

I have not done any serverside rendering, since I have developed mobile apps most of the time, which has the assets available on clientside.

Maybe look at this Demo to get your head around this: https://github.com/rackt/react-router-mega-demo

Upvotes: 1

Related Questions