I create a Context in React.js with TypeScript but this error had occurred: Cannot find namespace 'JobContext'.ts(2503)
import React, { createContext, useState } from 'react';
export const JobContext = createContext<any>({});
const JobContextProvider = ({ children }) => {
const [data, setData] = useState<any>();
const updatingState = (newData) => setData({ ...data, ...newData });
return (
<JobContext.Provider value={{data, updatingState}}>
{children}
</JobContext.Provider>
);
};
export default JobContextProvider;