Accessing React component children props from the parent

前端 未结 4 1285
野的像风
野的像风 2021-01-07 16:36

I am currently in the process of designing the interface for a game engine that is written in JavaScript and ReactJS.

If a game object has a texture, the source of t

4条回答
  •  鱼传尺愫
    2021-01-07 17:34

    What needs to own the texture, and what should its parent be?

    Could you define a GameObject that owns and is the parent of the Texture? eg:

    
    

    And GameObject then renders the texture (In GameObject's render() )?

    return <....>
       
         
    

提交回复
热议问题