Simplify Table internals & enhance React integration#57
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Simplify Table internals & enhance React integration
Summary
Simplifies
Tableimplementation by removing complex incremental view updates in favor of straightforward memoization refresh, while enhancing the ReactuseTablehook with automatic memoization management.Changes
Core (
Table.ts)_applyViewUpdateincremental merge algorithm — replaced with simpler_refreshMemoizationthat rebuilds sorted arrays on change_keyComparatorhelper and_allocateEmptyArrayutility__DEFAULT_PARTITION__) concept —partition()now requires explicit nameentries()iterator to derive values from keysReact Integration (
useTable.tsx)memoparameter (default:true) to control memoizationTests
lifecycletest suite verifying subscribe/memo called once on mountmemoizationtest suite for opt-in/opt-out behaviorrendersdescribe blockDemo
PerfAppfor performance comparisonBreaking Changes
partition()no longer accepts empty call — must provide partition name