when I want to show Accordion on the basis of this statement=> {access === 2 && ( <= Screen disapppears.. and after removing this state it works.
Here is the Error and Example
Error :react.development.js:879 Uncaught Error: React.cloneElement(...): The argument must be a React element, but you passed null. Example :
const [access, setAccess] = useState(null);
setAccess(2);
<Accordion arrowIcon="">
<Accordion.Panel>
<Accordion.Title >
dummy title 1
</Accordion.Title>
<Accordion.Content>
dummy text 1.....
</Accordion.Content>
</Accordion.Panel>
{access === 2 && (
<>
<Accordion.Panel>
<Accordion.Title>
dummy title 2
</Accordion.Title>
<Accordion.Content>
dummy text 2.....
</Accordion.Content>
</Accordion.Panel>
</>
)}
</Accordion>