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
suspend option as we have in our hooks:
|
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
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):
suspendoption as we have in our hooks:js-sdk/packages/react/README.md
Line 246 in e3c9d79