cloudflare / cloudflare/react-gateway

Problems from swapping components

Open
#16 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
576
Forks
70
PR merge metrics
No merged PRs in 30d

Description

We're running into problems because we're trying to replace one with another within a single update. The new 's componentWillMount triggers before the old one's componentWillUnmount, resulting in a spurious "Only a single Gateway can be rendered at a time into a GatewayDest" warning, followed by the older gateway's componentWillUnmount removing the new gateway's children (because GatewayRegistry.removeChild doesn't care _whose_ children it's removing).

One solution is to add or restore support for multiple children (see #15 or [briteback/react-gateway](https://github.com/briteback/react-gateway)).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.