able-baker/example/app.tsx

13 lines
287 B
TypeScript
Raw Normal View History

import React from "react";
2023-06-15 17:13:51 -04:00
const CTX = React.createContext("lol");
2023-06-07 14:15:57 -04:00
export default ()=>
{
2023-06-15 17:13:51 -04:00
return <CTX.Provider value="intradestink">
2023-06-15 17:50:55 -04:00
<div><h1>hey!</h1></div>
2023-06-15 17:13:51 -04:00
<CTX.Consumer>
{(value)=><button>{value}</button>}
</CTX.Consumer>
</CTX.Provider>
2023-06-07 14:15:57 -04:00
}