Skip to content

Conversation

upupming
Copy link
Collaborator

@upupming upupming commented Aug 8, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Resolved an issue where state was not correctly maintained across multiple calls to the data processor, ensuring consistent state updates in components using initialization data.
  • Tests

    • Added and improved tests for state injection and update behavior when using the initialization data feature, enhancing test clarity and coverage.
  • Chores

    • Simplified and restructured test setup for better reliability and maintainability.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

Copy link

changeset-bot bot commented Aug 8, 2025

🦋 Changeset detected

Latest commit: 239d017

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lynx-js/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Aug 8, 2025

📝 Walkthrough

Walkthrough

This update addresses the state management and event handling logic for the withInitDataInState higher-order component in the @lynx-js/react package. It modifies how state updates are triggered and tested, updates the event payload format, and introduces comprehensive tests for state injection and persistence.

Changes

Cohort / File(s) Change Summary
State Management Logic
packages/react/runtime/src/compat/initData.ts
Adjusted the event listener callback in withInitDataInState to accept new state data as a parameter, updating the component state accordingly.
Event Payload Emission
packages/react/runtime/src/lynx/tt.ts
Changed the 'onDataChanged' event emission in updateCardData to emit the updated data object within an array, instead of undefined.
Test Enhancements
packages/react/runtime/__test__/compat/initData.test.jsx
Refactored test setup, grouped related tests, and added a new suite for withInitDataInState to verify state injection, update behavior, and persistence under various scenarios.
Changelog
.changeset/free-colts-listen.md
Added a changelog entry summarizing the patch for withInitDataInState to clarify the fix and its effect on state handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Suggested reviewers

  • colinaaa

Poem

A patch for state, so neat and bright,
Now data flows just right at night.
Tests abound, events anew,
The bunny hops to see it through.
With arrays and state in perfect tune,
This code will surely make devs swoon!
🐇✨

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🔭 Outside diff range comments (1)
packages/react/runtime/src/compat/initData.ts (1)

118-118: Handler type mismatch: widen h to accept event args

this.h is assigned a function with rest args, but it's declared as () => void. Update the type to avoid TS incompatibility and to match the listener signature.

-    h?: () => void;
+    h?: (...args: unknown[]) => void;
🧹 Nitpick comments (3)
.changeset/free-colts-listen.md (1)

5-5: Polish changeset wording for clarity

Rephrase for grammar and clarity. This reads better in release notes.

-fix `withInitDataInState` got wrong state in 2nd or more times `defaultDataProcessor`, now it will keep its own state.
+fix: withInitDataInState passed wrong state to `defaultDataProcessor` on subsequent updates. It now preserves and applies the component’s own state correctly across multiple updates.
packages/react/runtime/__test__/compat/initData.test.jsx (2)

55-55: Pass explicit empty args to emit for clarity and future type safety

Be explicit to match the new emit signature that expects an args array.

-    lynx.getJSModule('GlobalEventEmitter').emit('onDataChanged');
+    lynx.getJSModule('GlobalEventEmitter').emit('onDataChanged', []);

81-81: Typo in test title

Fix “componnet” → “component”.

-  it('should inject `__initData` to `state` of componnet', async () => {
+  it('should inject `__initData` to `state` of component', async () => {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8bce5e2 and 2a69e78.

📒 Files selected for processing (5)
  • .changeset/free-colts-listen.md (1 hunks)
  • packages/react/runtime/__test__/compat/initData.test.jsx (2 hunks)
  • packages/react/runtime/__test__/utils/jsModule.ts (1 hunks)
  • packages/react/runtime/src/compat/initData.ts (1 hunks)
  • packages/react/runtime/src/lynx/tt.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:26:16.722Z
Learning: In the lynx-family/lynx-stack repository, CI checks require changesets when files matching the pattern "src/**" are modified (as configured in .changeset/config.json). For internal changes that don't need meaningful changesets, an empty changeset file is used to satisfy the CI requirement while not generating any release notes.
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.627Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Learnt from: PupilTong
PR: lynx-family/lynx-stack#1029
File: packages/web-platform/web-core-server/src/createLynxView.ts:0-0
Timestamp: 2025-07-16T06:26:22.230Z
Learning: In the lynx-stack SSR implementation, each createLynxView instance is used to render once and then discarded. There's no reuse of the same instance for multiple renders, so event arrays and other state don't need to be cleared between renders.
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.139Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.
Learnt from: PupilTong
PR: lynx-family/lynx-stack#1029
File: packages/web-platform/web-core/src/uiThread/createRenderAllOnUI.ts:95-99
Timestamp: 2025-07-16T06:28:26.463Z
Learning: In the lynx-stack codebase, CSS selectors in SSR hydration are generated by their own packages, ensuring a predictable format that makes simple string manipulation safe and preferable over regex for performance reasons.
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.

Applied to files:

  • .changeset/free-colts-listen.md
📚 Learning: 2025-08-07T04:00:59.627Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.627Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.

Applied to files:

  • .changeset/free-colts-listen.md
📚 Learning: 2025-07-22T09:26:16.722Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:26:16.722Z
Learning: In the lynx-family/lynx-stack repository, CI checks require changesets when files matching the pattern "src/**" are modified (as configured in .changeset/config.json). For internal changes that don't need meaningful changesets, an empty changeset file is used to satisfy the CI requirement while not generating any release notes.

Applied to files:

  • .changeset/free-colts-listen.md
📚 Learning: 2025-07-16T06:26:22.230Z
Learnt from: PupilTong
PR: lynx-family/lynx-stack#1029
File: packages/web-platform/web-core-server/src/createLynxView.ts:0-0
Timestamp: 2025-07-16T06:26:22.230Z
Learning: In the lynx-stack SSR implementation, each createLynxView instance is used to render once and then discarded. There's no reuse of the same instance for multiple renders, so event arrays and other state don't need to be cleared between renders.

Applied to files:

  • packages/react/runtime/src/lynx/tt.ts
  • packages/react/runtime/src/compat/initData.ts
  • packages/react/runtime/__test__/compat/initData.test.jsx
📚 Learning: 2025-07-18T04:27:18.291Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1238
File: packages/react/runtime/src/debug/component-stack.ts:70-90
Timestamp: 2025-07-18T04:27:18.291Z
Learning: The component-stack.ts file in packages/react/runtime/src/debug/component-stack.ts is a direct fork from https://github.com/preactjs/preact/blob/main/debug/src/component-stack.js. The team prefers to keep it aligned with the upstream Preact version and may contribute improvements back to Preact in the future.

Applied to files:

  • packages/react/runtime/src/compat/initData.ts
  • packages/react/runtime/__test__/compat/initData.test.jsx
📚 Learning: 2025-08-06T13:28:57.139Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.139Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/react/runtime/__test__/compat/initData.test.jsx
📚 Learning: 2025-08-06T13:28:57.139Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.139Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/react/runtime/__test__/compat/initData.test.jsx

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link

codspeed-hq bot commented Aug 8, 2025

CodSpeed Performance Report

Merging #1478 will not alter performance

Comparing upupming:fix/withInitDataInState-merge (239d017) with main (2293371)

Summary

✅ 10 untouched benchmarks

Copy link

relativeci bot commented Aug 8, 2025

Web Explorer

#4483 Bundle Size — 366.68KiB (0%).

239d017(current) vs d33c1d2 main#4478(baseline)

Bundle metrics  Change 1 change
                 Current
#4483
     Baseline
#4478
No change  Initial JS 143.49KiB 143.49KiB
No change  Initial CSS 31.84KiB 31.84KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 7 7
No change  Assets 7 7
Change  Modules 210(-0.94%) 212
No change  Duplicate Modules 17 17
No change  Duplicate Code 3.89% 3.89%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#4483
     Baseline
#4478
No change  JS 234.68KiB 234.68KiB
No change  Other 100.16KiB 100.16KiB
No change  CSS 31.84KiB 31.84KiB

Bundle analysis reportBranch upupming:fix/withInitDataInState...Project dashboard


Generated by RelativeCIDocumentationReport issue

Copy link

relativeci bot commented Aug 8, 2025

React Example

#4490 Bundle Size — 237.07KiB (~+0.01%).

239d017(current) vs d33c1d2 main#4485(baseline)

Bundle metrics  Change 1 change
                 Current
#4490
     Baseline
#4485
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 38.51% 38.51%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 158 158
No change  Duplicate Modules 64 64
Change  Duplicate Code 45.86%(+0.07%) 45.83%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#4490
     Baseline
#4485
No change  IMG 145.76KiB 145.76KiB
Regression  Other 91.31KiB (~+0.01%) 91.3KiB

Bundle analysis reportBranch upupming:fix/withInitDataInState...Project dashboard


Generated by RelativeCIDocumentationReport issue

@upupming upupming requested a review from PupilTong as a code owner August 8, 2025 09:16
@PupilTong
Copy link
Collaborator

Please rebase ur branch XD

@upupming upupming force-pushed the fix/withInitDataInState-merge branch from 8602206 to dfe3db3 Compare August 8, 2025 09:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
packages/react/runtime/__test__/compat/initData.test.jsx (2)

80-82: Create the wrapped component per-test to avoid cross-test leakage

const _App = withInitDataInState(App); is declared once for the whole describe block, yet the class App captures app into a shared variable.
If withInitDataInState stores static metadata, reusing the same wrapper can leak listeners between tests.
Move the wrapping into each it or a fresh beforeEach:

-const _App = withInitDataInState(App);
-it('should inject …', () => {
-  render(<_App />, scratch);
+it('should inject …', () => {
+  const Wrapped = withInitDataInState(App);
+  render(<Wrapped />, scratch);

This keeps every test fully isolated.


134-135: Use .not.toEqual for clarity

Chai’s not.eq works, but the more idiomatic Vitest/Jest style reads better for objects:

-expect(app.state).not.eq(lynx.__initData);
+expect(app.state).not.toEqual(lynx.__initData);

Pure readability nit – ignore if the team prefers the Chai alias.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a69e78 and dfe3db3.

📒 Files selected for processing (4)
  • .changeset/free-colts-listen.md (1 hunks)
  • packages/react/runtime/__test__/compat/initData.test.jsx (2 hunks)
  • packages/react/runtime/src/compat/initData.ts (1 hunks)
  • packages/react/runtime/src/lynx/tt.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/react/runtime/src/lynx/tt.ts
  • .changeset/free-colts-listen.md
  • packages/react/runtime/src/compat/initData.ts
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.
Learnt from: PupilTong
PR: lynx-family/lynx-stack#1029
File: packages/web-platform/web-core-server/src/createLynxView.ts:0-0
Timestamp: 2025-07-16T06:26:22.230Z
Learning: In the lynx-stack SSR implementation, each createLynxView instance is used to render once and then discarded. There's no reuse of the same instance for multiple renders, so event arrays and other state don't need to be cleared between renders.
📚 Learning: 2025-08-06T13:28:57.139Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.139Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/react/runtime/__test__/compat/initData.test.jsx
📚 Learning: 2025-08-06T13:28:57.139Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.139Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/react/runtime/__test__/compat/initData.test.jsx
📚 Learning: 2025-07-18T04:27:18.291Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1238
File: packages/react/runtime/src/debug/component-stack.ts:70-90
Timestamp: 2025-07-18T04:27:18.291Z
Learning: The component-stack.ts file in packages/react/runtime/src/debug/component-stack.ts is a direct fork from https://github.com/preactjs/preact/blob/main/debug/src/component-stack.js. The team prefers to keep it aligned with the upstream Preact version and may contribute improvements back to Preact in the future.

Applied to files:

  • packages/react/runtime/__test__/compat/initData.test.jsx
📚 Learning: 2025-07-16T06:26:22.230Z
Learnt from: PupilTong
PR: lynx-family/lynx-stack#1029
File: packages/web-platform/web-core-server/src/createLynxView.ts:0-0
Timestamp: 2025-07-16T06:26:22.230Z
Learning: In the lynx-stack SSR implementation, each createLynxView instance is used to render once and then discarded. There's no reuse of the same instance for multiple renders, so event arrays and other state don't need to be cleared between renders.

Applied to files:

  • packages/react/runtime/__test__/compat/initData.test.jsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: CodeQL Analyze (actions)
  • GitHub Check: CodeQL Analyze (javascript-typescript)
  • GitHub Check: zizmor

@upupming upupming removed the request for review from PupilTong August 12, 2025 02:40
@upupming upupming requested a review from hzy August 20, 2025 05:17
@upupming upupming merged commit 52db511 into lynx-family:main Aug 22, 2025
93 of 97 checks passed
colinaaa pushed a commit that referenced this pull request Aug 26, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/[email protected]

### Patch Changes

- fix `withInitDataInState` got wrong state in 2nd or more times
`defaultDataProcessor`, now it will keep its own state.
([#1478](#1478))

- change `__CreateElement('raw-text')` to `__CreateRawText('')` to avoid
`setNativeProps` not working
([#1570](#1570))

- Fix wrong render result when using expression as `key`.
([#1541](#1541))

See
[#1371](#1371)
for more details.

- fix: `Cannot read properties of undefined` error when using `Suspense`
([#1569](#1569))

- Add `animate` API in Main Thread Script(MTS), so you can now control a
CSS animation imperatively
([#1534](#1534))

    ```ts
    import type { MainThread } from "@lynx-js/types";

    function startAnimation(ele: MainThread.Element) {
      "main thread";
      const animation = ele.animate([{ opacity: 0 }, { opacity: 1 }], {
        duration: 3000,
      });

      // Can also be paused
      // animation.pause()
    }
    ```

## @lynx-js/[email protected]

### Patch Changes

- Support caching Lynx native events when chunk splitting is enabled.
([#1370](#1370))

When `performance.chunkSplit.strategy` is not `all-in-one`, Lynx native
events are cached until the BTS chunk is fully loaded and are replayed
when that chunk is ready. The `firstScreenSyncTiming` flag will no
longer change to `jsReady` anymore.

- Support exporting `Promise` and function in `lynx.config.ts`.
([#1590](#1590))

- Fix missing `publicPath` using when `rspeedy dev --mode production`.
([#1310](#1310))

- Updated dependencies
\[[`aaca8f9`](aaca8f9)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## [email protected]

### Patch Changes

- Add `@lynx-js/preact-devtools` by default.
([#1593](#1593))

## @lynx-js/[email protected]

### Patch Changes

- Bump @clack/prompts to v1.0.0-alpha.4
([#1559](#1559))

## @lynx-js/[email protected]

### Patch Changes

- Support using multiple times in different environments.
([#1498](#1498))

- Support caching Lynx native events when chunk splitting is enabled.
([#1370](#1370))

When `performance.chunkSplit.strategy` is not `all-in-one`, Lynx native
events are cached until the BTS chunk is fully loaded and are replayed
when that chunk is ready. The `firstScreenSyncTiming` flag will no
longer change to `jsReady` anymore.

- Updated dependencies
\[[`f0d483c`](f0d483c),
[`e4d116b`](e4d116b),
[`d33c1d2`](d33c1d2)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Support using multiple times in different environments.
([#1498](#1498))

- Alias `@lynx-js/preact-devtools` to `false` to reduce an import of
empty webpack module.
([#1593](#1593))

## @lynx-js/[email protected]

### Patch Changes

- Support `lynx.createSelectorQuery().select()` and `setNativeProps` API
([#1570](#1570))

## @lynx-js/[email protected]

### Patch Changes

- fix: globalThis is never accessible in MTS
([#1531](#1531))

-   Updated dependencies \[]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- fix: fake uidisappear event
([#1539](#1539))

- Updated dependencies
\[[`70863fb`](70863fb)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- fix: globalThis is never accessible in MTS
([#1531](#1531))

- Updated dependencies
\[[`70863fb`](70863fb)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- fix: globalThis is never accessible in MTS
([#1531](#1531))

- Updated dependencies
\[[`70863fb`](70863fb)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Add new `LynxCacheEventsPlugin`, which will cache Lynx native events
until the BTS chunk is fully loaded, and replay them when the BTS chunk
is ready. ([#1370](#1370))

- Updated dependencies
\[[`aaca8f9`](aaca8f9)]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Updated dependencies
\[[`aaca8f9`](aaca8f9)]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Updated dependencies
\[[`aaca8f9`](aaca8f9)]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Updated dependencies
\[[`aaca8f9`](aaca8f9)]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Always inline the background script that contains rspack runtime
module. ([#1582](#1582))

- Updated dependencies
\[[`aaca8f9`](aaca8f9)]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Add `lynxCacheEventsSetupList` and `lynxCacheEvents` to
RuntimeGlobals. It will be used to cache Lynx native events until the
BTS chunk is fully loaded, and replay them when the BTS chunk is ready.
([#1370](#1370))

## [email protected]



## @lynx-js/[email protected]



## @lynx-js/[email protected]



## @lynx-js/[email protected]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants