Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 18 Sep 16:25
· 10 commits to main since this release
de6591f

Minor Changes

  • #5085 51437a4d036029ab4ff74cb52721178b3e525c48 Thanks @davidkpiano! - The shallowEqual comparator has been added for selector comparison:

    import { shallowEqual } from '@xstate/store';
    import { useSelector } from '@xstate/store/react';
    
    import { store } from './store';
    
    function MyComponent() {
      const state = useSelector(
        store,
        (s) => {
          return s.items.filter(/* ... */);
        },
        shallowEqual
      );
    
      // ...
    }