I have a: 3. [x] Idea: * [x] What problem would it solve for you? 🐛 Developer can subscribe the state changes. `v2.x api` ```typescript // 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` ```typescript 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!')) ``` * [x] Do you think others will benefit from this change as well and it should in core package? 💡 Yes * [x] Are you willing to (attempt) a PR yourself? ⚔ Yes
I have a:
Idea:
What problem would it solve for you? 🐛
Developer can subscribe the state changes.
v2.x apiv3.x apiDo 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