-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Requirements
With #1164, we added a new component-based API. This doesn't yet support any kind of "loading" or suspense until the provider is ready, or while context is being reconciled.
We should support this. There's some design choices to be made here. Consider how to give users control, as well as reasonable defaults, and also how to be consistent with similar configuration options elsewhere.
I see 2 possibilities (both may be valuable):
- add a
suspendoption as we have in our hooks:js-sdk/packages/react/README.md
Line 246 in e3c9d79
Use `useSuspenseFlag` or pass `{ suspend: true }` in the hook options to leverage this functionality. - we probably want to respect the settings at the context-provider level as well, similar to the way our hooks do.
- add a "loading" template option (I'm less sure about this, since suspense is essentially a native means of doing this)
- this would be displayed during provider reconciliation, or while the provider is not ready
- try to avoid duplication with existing suspense usage
- again, the best option may be to simply not include this, but I'm not sure
rahuld109
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed