-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mixed-mode] [idea] More composability. #19
Comments
Aha, I found the immediate solution for my case, I just pass the class Card extends React.Component {
render() {
let card = this.props.context
return (
<Node _famousParent={this.props._famousParent}> // <-- right here.
<DOMElement>
<BlazeCardWrapper context={card} />
</DOMElement>
</Node>
)
}
} |
Maybe we can add some additional logic somewhere to do this automatically? |
If there is no immediate I think that's what |
Any ideas here @pilwon? |
trusktr
changed the title
[idea] More composability.
[mixed-mode] [idea] More composability.
Sep 1, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alright, so I've adopted react-famous into my latest project (finally!). It's working great out of the box composing things like
Scene
,Node
, andDOMElement
together (using those components directly).But now what I'm trying to do is get more organized, so I've got something like this:
where
FeatureMapView
extendsNode
,and the
Card
component contains aNode
andDOMElement
instead of extending any of them:. The
BlazeCardWrapper
component just renders some normal HTML in theDOMElement
.The problem is, now that I've wrapped
Node
andDOMElement
inside of myCard
class, they don't become part of the scene graph as I was hoping. I was hoping to have the following hierarchy:react-famous says
It would be great if we could allow for things to be wrapped/owned by other components in order to have more control of the scene graph composition.
Any ideas @pilwon?
The text was updated successfully, but these errors were encountered: