jotaijs / jotai-scope

MIT License
55 stars 4 forks source link

feat(scope): add hybrid example of both initialize scoped atom on render and nested scopes #11

Closed yf-yang closed 10 months ago

codesandbox-ci[bot] commented 10 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 974d20844c109ced812293fe957976e50373e38b:

Sandbox Source
React Configuration
React TypeScript Configuration
dai-shi commented 10 months ago

It should be nice to have such an example. Please create it as a new example.

yf-yang commented 10 months ago

Ah, sorry, I thought I was placing it in a new folder

dai-shi commented 10 months ago

https://codesandbox.io/s/github/yf-yang/jotai-scope/tree/feat/example/examples/03_hybrid ☝️ works fine.

Please follow eslint rules.

dai-shi commented 10 months ago

On second thought, I wouldn't hesitate too much about providing ScopeProviderWithInitialValues from jotai-scope.