Repository navigation
|
I notice that Lexical would move update callback to
I don't quite understand what the use case is. There are three hypotheses:
So my question is: |
Replies: 1 comment 6 replies
|
Nested updates get queued to the end of the existing update. This ensures they run in a deterministic order and ensures update callbacks fire in the correct order too. This is really important, as early on we noticed that updates were being run within an update and all sorts of assumptions would break down. This is especially important as Lexical handles the batching of updates and typically tries to flush and commit changes async, but can also do this sync too depending on certain heuristics. Either way, this shouldn't really be an observable problem to the developer using Lexical and if it is, I'd like to understand why they're affecting you working the way they currently are. |
Nested updates get queued to the end of the existing update. This ensures they run in a deterministic order and ensures update callbacks fire in the correct order too. This is really important, as early on we noticed that updates were being run within an update and all sorts of assumptions would break down. This is especially important as Lexical handles the batching of updates and typically tries to flush and commit changes async, but can also do this sync too depending on certain heuristics.
Either way, this shouldn't really be an observable problem to the developer using Lexical and if it is, I'd like to understand why they're affecting you working the way they currently are.