All:
I am pretty new to React and Redux. Currently I want to build a header menu with several menu item in it which look like:
Each item can be click and highlighted (just use same color to highlight), the click action is toggling the highlight of that item.
I try to follow the pattern of redux, which saves the state of each item in a store ( this is the first place which confuses me, I am not sure if I should save this highlight state in component so it is easier for user specify initial highlight state, or in global store so I can sync everywhere ). But I do not know how to design the data structure for this, especially when it allows user to specify item initial state in JSX (such as <MenuItem highlight={true} />
)
Any example for this will be appreciated.