Prepare for performance improvements (#3684)
This PR is just a chore to prepare for future performance optimizations. Essentially I want to improve the performance of the `Menu`, `Listbox` and `Combobox` components but I want to do it in separate PRs such that reverting the improvements can be done if needed. This PR just sets up a `Machine` for state machines, and adds some helpers such as a `useSlice` to calculate parts of the state machine. Component using the `useSlice` will only re-render _if_ the slice changes. So apart from adding a library (`useSyncExternalStoreWithSelector`) and adding some setup code. Nothing in this PR changes the behavior of the components.
This commit is contained in:
+3
-2
@@ -12,6 +12,7 @@ sharedOptions+=("--bundle")
|
||||
sharedOptions+=("--platform=browser")
|
||||
sharedOptions+=("--target=es2020")
|
||||
|
||||
# Generate actual builds
|
||||
npx esbuild $input --format=esm --outfile=$outdir/$name.esm.js --sourcemap ${sharedOptions[@]} $@ --watch
|
||||
|
||||
# Generate actual builds
|
||||
NODE_ENV=development npx esbuild $input --format=esm --outfile=$outdir/$name.esm.js --sourcemap ${sharedOptions[@]} $@ --watch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user