Hello guy,
thank for this amazing framwork.
I’m building my new site using it and every thing is going great until I found that my actions doesn’t update the state
I have this state
state: {
theme: {
color: '#559acb',
isExtraLinksOpen: true,
isMenuOpen: false,
linksNumber: 5,
}
}
and this action which logs the old state and then toggle it
actions: {
theme: {
toggleExtraLinks: ({state}) => {
console.log('old state: ', state.theme.isExtraLinksOpen);
state.theme.isExtraLinksOpen = !state.theme.isExtraLinksOpen
}
}
}
I added the toggleExtraLinks
function to this button as following
<div className={className} onClick={actions.theme.toggleExtraLinks}>
but every time the old state is ALWAYS false
so the menu is always OPENED
what am I doing wrong ???
I recorded this video so I can show you a strange behavior I noticed with the state
https://screencast-o-matic.com/watch/cYVeDmvT8a