Alexey

Results 44 comments of Alexey

With shorthand implementation, I can notice this warning in the tests: ``` Warning: Cannot update a component (`c`) while rendering a different component (`c`). To locate the bad setState() call...

```js test("sync state access count", async () => { let snapshotAccess = 0 function sub() { return () => {} } function getStateSnapshot() { snapshotAccess++ return 0 } const TestComponent...

there new two from `__tests__/observer.test.tsx`: but seems like it's not related to the change `stateVersion` because the reaction fires it ``` console.error Warning: Cannot update a component (`Unknown`) while rendering...

I've pushed these small changes, I haven't noticed any `Warning: Cannot update a component` in my application or any artifacts This won't fix the original issue (dispose of reaction right...

> ```js > test("sync state access count", async () => { > let snapshotAccess = 0 > function sub() { > return () => {} > } > > function...

the main goal here is to remove subscription to observer immediatly if component rendering abandoned. This will fix onBecomeObserved/onBecomeUnobserved callbacks in some cases (current implementation based on GC and have...

same issue with react suspense: https://codesandbox.io/s/goofy-wright-kmpjxd?file=/src/App.tsx

Ideas: 1. on render, use `reaction` to collect used observables and interrupt render if some changes 2. destroy the first reaction after executing the `render` function but save a list...