Skip to content

Version 5.0.0

Latest
Compare
Choose a tag to compare
@bluebill1049 bluebill1049 released this 10 Jan 22:08
· 5 commits to master since this release
af5ac1f

๐ŸŽ‰ Version 5.0.0

  • Fine-tune the performance with partial render and selector
const selector = (state) => state.yourDetails.name.length > 10;

const { actions, state, getState } = useStateMachine<T>({
  actions?: Record<string, Function> // Optional action to update global state
  selector,
});
  • Isolated re-render at useStateMachine usgae, no longer use Context API
const App = () => (
- <StateMachineProvider>
    <YourComponent />
- <StateMachineProvider>
);