VittorioAccomazzi / julia

Julia Fractal Generator
1 stars 0 forks source link

Code Cleanup : improve the interface between components #10

Closed VittorioAccomazzi closed 4 years ago

VittorioAccomazzi commented 4 years ago

Some of the component (such as the AnimatorBase ) requires to pass react component has props. The consumer of AnimatorBase are creating the component, just to be cloned, which doesn't make much sense. It make sense to clone a component, only of the component passed in can not be used, but it is not the case here.

Patter for passing and interacting wit component in props is discussed in this article.

Based on usage patter of AnimatorBase we should use render function rather then cloning the component passed as props.