Minor Changes
-
Expose the
ChildrenAPI from ReactLynx and freeze the arrays returned byChildren.map,Children.forEach, andChildren.toArray. (#2376)Allow
@lynx-js/react0.121 and newer in GenUI peer dependency ranges.
Patch Changes
-
Report a development error when a page-data reset is combined with
withInitDataInState. (#2869)withInitDataInStatemergeslynx.__initDatainto the wrapped component's state, so resetting the page data —updatePage(..., { resetPageData: true })on the main thread, orupdateData(..., { type: 'reset' })on the background thread — cannot drop the keys the reset removed; the component keeps rendering the stale keys. A dev-only error is now reported (once per reset path) on both threads, pointing touseInitData()instead. The check is gated by__DEV__and is fully removed from production builds. -
Fix
withInitDataInStatenot refreshing the component state on a main-thread re-render. (#2868)withInitDataInStateinjectedlynx.__initDatainto the class component's state only in the constructor, and itsonDataChangedlistener was active on the background thread only. On the main thread the component instance is reused across anupdatePagere-render (the constructor never re-runs), so the injected state stayed frozen at the data from the first render. This surfaces whenever the main thread re-renders the screen itself before hydration (anupdatePagewhilefirstScreenSyncTimingis'jsReady'). The HOC now re-readslynx.__initDataon every render viagetDerivedStateFromProps, composing with — and not overriding — the wrapped component's owngetDerivedStateFromProps.