Prerequisites
Describe the issue
When using React to do condition rendering, Select will throw the following error:
How to replicate:
- Create a react application
- Create a state (e.g
const [show, setShow] = useState<boolean>(false))
- With click of button or any trigger, toggle state value
setShow((prev => !prev)
- In render:
return show ? <SgdsSelect>...</SgdsSelect> : <></>
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
Describe your frontend stack. What version of React and @govtechsg/sgds-web-component are you using? CSR or SSR?
CSR, 3.15.0
Prerequisites
Describe the issue
When using React to do condition rendering, Select will throw the following error:
How to replicate:
const [show, setShow] = useState<boolean>(false))setShow((prev => !prev)return show ? <SgdsSelect>...</SgdsSelect> : <></>What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
Describe your frontend stack. What version of React and @govtechsg/sgds-web-component are you using? CSR or SSR?
CSR, 3.15.0