Skip to content

Upgrade to React 16 + Streaming SSR - #308

Open
Restuta wants to merge 11 commits into
masterfrom
dev.react-16
Open

Upgrade to React 16 + Streaming SSR#308
Restuta wants to merge 11 commits into
masterfrom
dev.react-16

Conversation

@Restuta

@Restuta Restuta commented Nov 2, 2017

Copy link
Copy Markdown
Owner

Few things broke as part of this upgrade.

  1. opening a modal in a calendar and then reloading the page leads to inconsistent UI
  2. React 16 doesn't patch SSR HTML, so when we "guess" a viewport size on the server and render guessed version it stays the same on the client. We need to patch this up with something like Need a way to prevent component render on client side initial load react/react#8017 (comment)

see also this suggestion react/react#10591 (comment)

TL;DR this means

  1. we need to either get rid of this state and just show "normal" event page if page is refreshed, now when we have a "back to calendar" button this should be fine or we just need to render calendar on the client with a delay, e.g. twitter does this and trello
  2. to fix this we would need to force re-render of the calendar, there is no other way around this since viewport size is unknown on the server

@Restuta

Restuta commented Jan 11, 2018

Copy link
Copy Markdown
Owner Author

It would be nice to start using React Helmet, but it doesn't support streaming yet :( nfl/react-helmet#322

UPDATE:

This lib does https://github.com/staylor/react-helmet-async (https://spectrum.chat/thread/056d029c-99cc-4a54-889c-986497bc5646)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants