urugator

Results 135 comments of urugator

Are you aware of the `TimerBasedFinalizationRegistry` that is being used if `FinalizationRegistry` isn't available?https://github.com/mobxjs/mobx/blob/273e017646d6f1c59a63e28b3ba87ef427e8204e/packages/mobx-react-lite/src/utils/UniversalFinalizationRegistry.ts#L12 It's the same idea, but doesn't create timeout for each component and is a bit less...

> Are there any blockers to use TimerBasedFinalizationRegistry even if FinalizationRegistry is available? Atm `TimerBasedFinalizationRegistry` is a workaround that ideally would not need to exist. > With GC, data will...

> so when we dispose of a reaction because of timeout, we can also change stateVersion so react will re-render the component by itself That's what we do: https://github.com/mobxjs/mobx/blob/273e017646d6f1c59a63e28b3ba87ef427e8204e/packages/mobx-react-lite/src/useObserver.ts#L55-L64

I see. So, potentially, we can move https://github.com/mobxjs/mobx/blob/273e017646d6f1c59a63e28b3ba87ef427e8204e/packages/mobx-react-lite/src/useObserver.ts#L64 to https://github.com/mobxjs/mobx/blob/273e017646d6f1c59a63e28b3ba87ef427e8204e/packages/mobx-react-lite/src/utils/observerFinalizationRegistry.ts#L4-L9 and get rid of https://github.com/mobxjs/mobx/blob/273e017646d6f1c59a63e28b3ba87ef427e8204e/packages/mobx-react-lite/src/useObserver.ts#L55 because that should never happen (react throws away uncommited component, because it sees a new...

If it works, I am personally open to that change. But it doesn't help much with the original issue or does it? > I can notice this warning in the...

Use one of these: https://github.com/mobxjs/mobx/blob/55260aa158919033e862d219e60eea601a05ac61/scripts/build.js#L56-L59 https://www.unpkg.com/browse/[email protected]/dist/ > package export conditions I am not up to date how "wide" the support is or what is or isn't possible. If you can...

https://react.dev/reference/react/StrictMode#fixing-bugs-found-by-double-rendering-in-development

> the component in profiler would be grey and not yellow. Not sure if I follow. https://legacy.reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html#flame-chart *The color of a bar indicates how long the component (and its children)...

https://mobx.js.org/react-integration.html#callback-components-might-require-observer

IIRC there were some tests in V4 that were relevant only for `proxy: false` (don't have an analog in V5) or had different expectations or required a bit different API...