Docs say it's memoized and I was curious about how bad memory usage can get over time because of it and just wanted to see what approach did you choose with it. Checked the source code and haven't found any trace of memoization anywhere.
Quick test shows that linkstate(state, 'foo') !== linkstate(state, 'foo'). Maybe I'm missing something.
What did you mean by
🤔 Why?
linkState() is memoized: it only creates a handler once for each (key, eventPath) combination.
This is important for performance, because it prevents handler thrashing and avoids allocations during render.
🤔
Docs say it's memoized and I was curious about how bad memory usage can get over time because of it and just wanted to see what approach did you choose with it. Checked the source code and haven't found any trace of memoization anywhere.
Quick test shows that
linkstate(state, 'foo') !== linkstate(state, 'foo'). Maybe I'm missing something.What did you mean by
🤔