Does jotai have a limitation caused by its WeakMap usage when it comes to multiple window apps? #2748
-
I had migrated to jotai and been building my app on it until I came across, in a discussion, the below "limitation" of jotai when it comes to its usage of WeakMap to hold references (when making a multiple window app, which is what I am making). Is this a valid concern, or a misunderstanding on the part of the person who wrote it? If so, is it actually easy to overcome that limitation?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Can you use atomWithBroadcast? |
Beta Was this translation helpful? Give feedback.
-
I don't think it's because of WeakMap but the store object. If there are two memory spaces, two stores are isolated. Like, |
Beta Was this translation helpful? Give feedback.
That's correct. It's doable but not easy.