13 lines
287 B
TypeScript
13 lines
287 B
TypeScript
import React from "react";
|
|
|
|
const CTX = React.createContext("lol");
|
|
|
|
export default ()=>
|
|
{
|
|
return <CTX.Provider value="intradestink">
|
|
<div><h1>hey!</h1></div>
|
|
<CTX.Consumer>
|
|
{(value)=><button>{value}</button>}
|
|
</CTX.Consumer>
|
|
</CTX.Provider>
|
|
} |