hexacta / sanata

Web application showing auto generated tweets based on a Markov Chain model of a given Twitter user.
https://showcase.hexacta.com/sanata
3 stars 6 forks source link

Due to dynamic styling components are getting coupled #32

Open anicarrr opened 7 years ago

anicarrr commented 7 years ago

Some child components depend on parent props to set their style, in this case dynamic ones. In order to get cleaner code and a better component orientated app maybe all props related with styling can be reach by CONTEXT.

https://facebook.github.io/react/docs/context.html

In that way, we can use transfering props only for business logic and not mixing them up with props only for styling propuses.

anicarrr commented 7 years ago

We can try Redux as welll.

pomber commented 7 years ago

Maybe the problem is the way we are using react motion. I would prefer to avoid Redux (and context) if we can.