How do you share code between your React components without introducing more components into the hierarchy? You can't say mixins! :P
-
-
oh, it can be done. but i'd prefer composition instead of inheritance
@satya164@ryanflorence -
how about a function that takes some arguments and generates a component?
-
that's a higher-order component. and yes, it'll add that component to the hierarchy when you use it.
-
But higher order component takes a component as argument. createCustomComponent({ _stuff() {}, render() {} }
-
I'm talking about a function that'll just take an object and add create a new component with the properties
End of conversation
New conversation -
-
-
hehe it *does* seems like the correct solution here.
-
we extend React.Component all the time, so ¯\_(ツ)_/¯
-
yes and it makes me laugh
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.