Post

@acemarke.dev Crazy idea but I wonder if it would make sense to have a compiler for selectors that automatically memoizes, like how React Compiler. So you don't have to manually optimize e.g. with `createSelector`. Is this something you've thought about before?

0 reposts1 like

No, not something I've thought about. In a loose sense, something like Daishi's "tracked selectors" would be similar-ish. Proxy the entire state, track value reads in the component.