I keep wanting to use a use cotext hook but i learned to use use context by putting an empty {} in the create context thing. But it is giving me errors. Not assignable to {} and type any not available.
import React from "react";
type data = {
state?: any;
};
const state = 1;
export const BasicContext = React.createContext<data>(state);
this gave an error
Type '1' has no properties in common with type 'data'.(2559)
How do i fix it? It is weird?