Skip to content

Change User dynamically #166

@pwan001-dev

Description

@pwan001-dev

Since the user is provided as a parameter to the HoC, the user is bound to the "instance" of the Provider component that's returned by the withLDProvider HoC. That means, any time the user sign in status changes in our app, we must create a new wrapped Provider component, which will re-instantiate the entire DOM that's beneath the Provider.

Instead of using a HoC, I'm curious why we can't just provide at least the User via props to the Provider component, and have the Provider re-initialize if the User changes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions