Clean up on style options vs. props #2310
Labels
backlog
Out of scope for the current iteration but it will be evaluated in a future release.
bug
Indicates an unexpected problem or an unintended behavior.
front-burner
p1
Painful if we don't fix, won't block releasing
Milestone
Version
master
Describe the bug
Our React context (namely,
Composer.js
) and Redux store is kind of a bin to throw stuff at, we didn't clear up the responsibility of each. Also same for style options vs. props.### React Context vs. Redux storeRedux store should only hold UI-agnostic content, for example,activities
. It should not hold UI features, likelanguage
. Redux store is designed to be able to bring in independently to React Native. Or maybe Angular thru NgRx, but not guaranteed.React store should keep UI features, likelanguage
and which activities has been spoken.Things keep in Redux store can go thru de/hydration loop. Think about survivability across F5. Speech synthesis doesn't meet this bar (not desirable to be survived).Style options vs. props
Style options is designed to be a flat dictionary and easily serializable as query string. We should keep styles in it, including temporary styles, for example,
groupTimestamp
andsendTimeout
. The only exception isdisabled
, because it is React convention.Props keep things unrelated to styling, for example, Redux store, renderer middleware, ponyfills. Usually, they are heavy objects or functions.
What is not great today
This listing is for stuff that are not great.
[Bug]
The text was updated successfully, but these errors were encountered: