Problems with React16's new api,Context

first declare a Context

import Father from "./Father"
const ThemeContext = React.createContext()
<ThemeContext.Provider value={{color:"red"}}>
        <Father />
</ThemeContext.Provider>

how to use the value of ThemeContext if you want to use it in the Father file.
can"t get the ThemeContext of the parent component in Father, so how to use Context.Consumer

Jul.08,2021

<ThemeContext.Consumer>
{value => /* render something based on the context value */}
</ThemeContext.Consumer>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b8bb-2c295.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b8bb-2c295.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?