Patch Changes
-
Type the context argument of
usewith React'sContext, matching the rest of the public surface.@lynx-js/reactre-exportscreateContextfromreact, so declaringuseagainst Preact'sContextmade a context created through the package fail to type-check. (#3837) -
Keep ordinary callback ref cleanup separate for each node binding. Sharing one callback between multiple nodes no longer cleans up another node's binding during attachment, replacement, or removal. Bindings retain their cleanup across hydration and keyed moves in both Snapshot and Element Template. (#3902)
-
withLynxConfig()now loadsrsbuild.config.*in an Rsbuild project, not onlylynx.config.*in an Rspeedy one, so Rstest runs in both. (#3864) -
Clean up direct callback refs when they are set to
nullorundefinedafter hydration in the Snapshot backend. Call the binding's returned cleanup, or passnullto the callback when no cleanup was returned, without repeating cleanup on a later unmount. (#3911) -
Fix the queries returned by
renderfrom@lynx-js/react/testing-librarybeing typed as a union of every query's result when noqueriesoption is passed, which madefireEvent.tap(await findByText(...))fail to type-check. (#3864) -
Fix
use()from@lynx-js/react/compatthrowingcannot read property '__cC0' of undefinedon the main thread. The main-thread renderer never set_globalContexton the components it builds, andusereads its context provider from there.useContextwas unaffected because it readscontextinstead. (#3838)