实际上,我试图在react 中隐藏和显示一些 html 元素。我创建了一个员工表单,其中我们有多个分区,例如个人信息、联系信息等...我在表单中创建了下一个和上一个按钮以显示和隐藏表单中的其他分区有一个分区,其中我们有教育要填写的详细信息,因此我选择保留加号和减号按钮以使用条件添加教育详细信息。
But finally, my problem is like i have complex conditions on **render** function:
{someCondition && <div>
{anotherCondition && <div></div>}
</div>}
But, i'm getting: *Adjacent JSX elements must be wrapped in an enclosing tag error*. So, what i'm supposed to do?