Fix preact selector stability#318
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe preact-store ChangesSelector memoization enhancement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 1ce4418
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 0 bumped as dependents. 🟩 Patch bumps
|
@tanstack/angular-store
@tanstack/preact-store
@tanstack/react-store
@tanstack/solid-store
@tanstack/store
@tanstack/svelte-store
@tanstack/vue-store
commit: |
This PR fixes the ability to run non-stable Preact selectors in
useSelector; preventing infinite loopsSummary by CodeRabbit
Bug Fixes
useSelectornow properly handles unstable selector functions, reducing unnecessary component re-renders and improving performance when utilizing non-memoized selectors.Tests
useSelectorcorrectly processes complex selector patterns, including those returning arrays and other data structures.