这是来自ReactJS的新入门者。无法获得容易掌握的资源促使我再次敲响SO。问题是这个。我有一个React组件,即 RegisterAccount ,当点击时会拍摄另一个组件(弹出窗口),允许用户填写注册帐户所需的详细信息。现在,一旦帐户成功注册,我想将注册帐户添加为 RegisterAccount 下的另一个组件。如何设置此通讯?
This is from a new starter of ReactJS. Unavailability of easily graspable resources has prompted me to knock at SO again. The issue is this. I have a React Component namely, RegisterAccount which when clicked shoots another component (a pop-up) allowing users to fill in the required details to register an account. Now once an account is successfully registered, I want to add the registered account as another component under RegisterAccount. How can I have this communication set up?
//In RegisterAccount <addAccount/> //pop-up <accountAdded/> //if account added, then show this component推荐答案
我是React的新手。我也在寻找如何。我看到了这个文章! 如下所示
I'm new to React. I was also finding how. and I saw this article! It says like belows
render : function() { return ( <div> { true && <AddAccount /> } { false && <AccountAdded /> } </div> ); }更多推荐
如何在ReactJS中有条件地加载组件
发布评论