Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to React 16 + Streaming SSR #308

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Upgrade to React 16 + Streaming SSR #308

wants to merge 11 commits into from

Conversation

Restuta
Copy link
Owner

@Restuta Restuta commented Nov 2, 2017

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 facebook/react#8017 (comment)

see also this suggestion facebook/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
Copy link
Owner Author

Restuta commented Jan 11, 2018

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