# React useContext * 使用useContext可以讓子元件直接使用父元件的state ![](https://i.imgur.com/0x8FnGx.png) ![](https://i.imgur.com/p7h9RKA.png) * 在子元件使用前,把它import在所有元件最外層 ![](https://i.imgur.com/CkBAWF1.png) * 在子元件中使用方式 ![](https://i.imgur.com/t21bpu6.png)