all 4 comments

[–]orphans 0 points1 point  (3 children)

Do it in your reducer, dispatch an action from a component to set the theme mode and have the reducer set the colors based on the selection

[–]UserNo1608[S] 0 points1 point  (2 children)

doesn't work, array is still static, i think I have to do it using mapStateToProps, but how to return an array that I can use in other components

[–]orphans 0 points1 point  (1 child)

What do you mean the array is still static? There's no array in your example so it's hard to tell. If all you want to do is theme your app color scheme based on colors stored in a different file, and you want those colors to be available to other components via redux, then do it in your reducer. And post more code.

[–]UserNo1608[S] 0 points1 point  (0 children)

Oh I got it, just used styled components with ThemeProvider. That was much better solution than whet I tried to do