CrocoDillon / universal-react-redux-boilerplate

Step by step creation of a Universal React + Redux Boilerplate
Other
176 stars 33 forks source link

React-Router-4/Redux w server-side rendering (very close, help needed) #25

Closed rolele closed 7 years ago

rolele commented 7 years ago

This is probable not ready for merge. I think there is some unuseful export and also quite a bit of console.log.

Now I think, I am pretty close to have a fully working solution but I need help to solve a problem in particular.

Let me explain the solution first:

The problem I have: Let say I am trying to test server-side rendering on a BlogArticle: http://localhost:3000/blog/the-wizard-of-oz

Anyone would like to help on that one?

rolele commented 7 years ago

Actually I fixed it. I defined componentWillMount in BlogArticle instead of a componentDidMount (which is not executed on server-side)

CrocoDillon commented 7 years ago

Thanks for this! I just don't have time to go over the code in detail yet but will do that in the next few days.

One thing I can say is that I'd like to keep the scope of the PR limited to updating to RRv4. Changes regarding code style, white space, adding Babel transforms (isn't that included in stage-0 preset?), adding favicon etc. just pollutes the diff.

Regarding code style I might convert this repo to use Prettier someday since that's what all the cool kids are using nowadays. But not yet 😄

rolele commented 7 years ago

Sure @CrocoDillon , I spend so much time on this I actually do not have time to rework this PR but you should be able to pick and choose only the essential parts to perform the update to rr4. Cheers

CrocoDillon commented 7 years ago

Sure thing, I appreciate it! I'll probably have time in the weekend :)

Cheers

CrocoDillon commented 7 years ago

Bit later than I wanted but it's merged (with some changes from my side)