This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
perf(plugin): prevent infinite loop on mobile #361
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I fixed infinite loop on mobile.
If dataset has switch dataset field, this will cause infinite loop.
The reason of infinite loop is we couldn't synch dataset between sidebar and popup.
We have same logic on PC too, but the project state is in same runtime on PC, so the project is managed by React.
On the other hand, the project is in different runtime on mobile. We have two the project state on sidebar and popup.
That is, these state aren't synched by React, so we need to manage these state manually.