We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a:
Idea:
What problem would it solve for you? 🐛 Developer can subscribe the state changes. v2.x api
v2.x api
// subscribe actions // (storeName, actionList, callback) => void subscribe('Counter', ['increment'], () => (count += 1)) // subscribe properties changes // (storeName, mapStateFunction, callback) => void subscribe('Counter', state => state.count, () => alert('counter count change!'))
v3.x api
const store = Store({ // ... actions: { updateA: (s, payload) => { ... }, updateC: (s, payload) => { ... }, updateD: (s, payload) => { ... } } }) // subscribe actions store.subscribe(['updateA'], () => (count += 1)) // subscribe properties changes store.subscribe(state => state.A, () => alert('A change!'))
Do you think others will benefit from this change as well and it should in core package? 💡 Yes
Are you willing to (attempt) a PR yourself? ⚔ Yes
The text was updated successfully, but these errors were encountered:
leecade
panjizhi
No branches or pull requests
I have a:
Idea:
What problem would it solve for you? 🐛
Developer can subscribe the state changes.
v2.x api
v3.x api
Do you think others will benefit from this change as well and it should in core package? 💡 Yes
Are you willing to (attempt) a PR yourself? ⚔
Yes
The text was updated successfully, but these errors were encountered: