Skip to content

Suspense should support updating state of children while suspended#2159

Draft
sventschui wants to merge 1 commit into
mainfrom
bugfix/suspense-state-update
Draft

Suspense should support updating state of children while suspended#2159
sventschui wants to merge 1 commit into
mainfrom
bugfix/suspense-state-update

Conversation

@sventschui

Copy link
Copy Markdown
Member

Suspense should support updating state of children while suspended.

Could not yet come up with a solution

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 100.0% when pulling c020675 on bugfix/suspense-state-update into 2cfba0e on master.

@marvinhagemeister

Copy link
Copy Markdown
Member

FYI: We can always merge the test when it's skipped until we find a solution. That's how we did it in the early days of X :)

@Inviz

Inviz commented Jan 27, 2020

Copy link
Copy Markdown

I think I've stumbled upon the same issue - when the component that has Suspense in it updates while lazy component is being loaded, preact crashes on:

		if (!--c._suspensions) {
			c._vnode._children[0] = c.state._suspended; // < crashes here as _children is undefined
			c.setState({ _suspended: (c._detachOnNextRender = null) });
		}
	};```

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.

4 participants