-
Hello! My team and me are just starting to migrate to Jotai from Recoil on all our applications. We really like the simplicity so far! Today, we came across an issue: We have an To be clear, we want to this: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, there're no downsides.
Good point. We basically recommend using utils such as loadable outside render if possible. We should probably improve the doc about it. In your case, it's not possible because jotai/src/vanilla/utils/loadable.ts Lines 4 to 6 in 9b83585 |
Beta Was this translation helpful? Give feedback.
No, there're no downsides.
Good point. We basically recommend using utils such as loadable outside render if possible. We should probably improve the doc about it.
In your case, it's not possible because
fossilFuelType
comes from props presumably.Using loadable in render is supported through adding util-level caching.
For anyone interested, check out the code:
jotai/src/vanilla/utils/loadable.ts
Lines 4 to 6 in 9b83585