如何将 Link 组件的“ischecked”状态传递给下面的输入?我的目标是单击其他组件上的按钮,将输入框设置为 true。
<Link
to={{pathname: "/Module1",
state: {
ischecked: false,
},
}}
className={styles.menuCard}>
<h2>Introduction →</h2>
<p>Lesson 1</p>
<input className={styles.checkbox} type="checkbox"
checked={ischecked} /> <<--cant access? how to access?
</Link>