Comments (4)
Thanks a bunch. I hadn't come across the reset topic in RHF. That was what I needed.
from little-state-machine.
Yea the reset will need a restart, honestly, i haven't spent too much time with the dev tool.
from little-state-machine.
Yea the reset will need a restart, honestly, i haven't spent too much time with the dev tool.
I wasn't really worried about the devtool, but was worth mentioning. If you look at the modified demo though, should setting the state back to the original not cause the app to re render? Instead of using window.STATE_MACHINE_RESET
, I'm actually updating the state. The console debug output shows that the state has been changed, but the app doesn't update.
from little-state-machine.
That's due to RHF is uncontrolled and you need to use its reset function: https://codesandbox.io/s/little-state-machine-demo-rkb2q?file=/src/form.js
from little-state-machine.
Related Issues (20)
- Does `useStateMachine` trigger re-renders when an update occurs in another component tree? HOT 5
- unable to create mock provider for Jest+React testing Lib HOT 6
- unable to clear store HOT 3
- Help with the LocalStorage and Next.JS HOT 1
- Bf a /:/66 HOT 1
- npm ERR! code ERESOLVE HOT 1
- How to push data to an array state machine HOT 2
- Code Sample in TS is not working correctly HOT 4
- Reset store to initial value ? HOT 1
- Catching Storage error HOT 1
- Error when using with next.js HOT 1
- state not up to date HOT 3
- how to get the global state value outside of the component. HOT 1
- Setting up testing patterns for LSM (React Testing Lib + Jest) - LSM returns empty object in JSDOM HOT 1
- Access the CreateStore Outside a React Component HOT 1
- Dynamically set store name with data from backend HOT 1
- Changing schema of state - guidance on versioning/migrations?
- Type Error for actions without a payload.
- List of Contributors to be present in the Readme HOT 2
- How to use LSM in Next.js 14 (app router)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from little-state-machine.