typeless-js / create-react-app-starter

CRA + typeless starter
https://typeless-cra-starter.netlify.com
MIT License
21 stars 3 forks source link

Any SSR plans? #1

Open christophediprima opened 5 years ago

christophediprima commented 5 years ago

Hello!

Do you have any plans on supporting SSR? I am currently working on building a similar stack but yours look way more elegant.

Here it is: https://github.com/christophediprima/razzle-react-redux-observable-found

It supports server side rendering and pre-fetching based on route resolution. I am thinking about trying to replace my redux solution with typeless... any pre-advice would be very welcome! :)

lstkz commented 5 years ago

Hi,

I am planning to implement SSR when React.lazy officially supports it.

christophediprima commented 5 years ago

Do you also have some ideas on how you will handle pre-fetching?

I am using following library https://github.com/BerkeleyTrue/react-redux-epic and dispatching actions in the "getData" prop of my routing components.

I don't think React.Lazy will help on waiting for calls in epics to be finished...

lstkz commented 5 years ago

Something like this:

Also you can check PR from redux-observable https://github.com/redux-observable/redux-observable/pull/539