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

Allow loading prop on Rehydrated to accept null values #423

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

Conversation

3nvi
Copy link

@3nvi 3nvi commented Jun 7, 2019

Issue #, if available:
#422

Description of changes:
This PR simply checks loading against an undefined value, instead of a falsy one. The PR also updated the README of the subrepo in order to document the props that the Rehydrated component accepts

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@matthamil
Copy link

I'm not sure there's much of a need for the loading prop to accept a null value. If you don't want to render anything with the <Rehydrated /> component, you can use the render prop to provide a function that returns null, which is an existing component API.

Imo, a nicer win would be to remove the "Loading..." message that appears by default when the rehydration is in progress. If the <Rehydrated /> component wraps an entire screen (or a large portion of one), it's quite jarring to see a white screen with "Loading..." for a moment prior to switching to the screen it was meant to render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants