Skip to content

Instantly share code, notes, and snippets.

@daniellealexis
daniellealexis / GeneratedExampleProvider.tsx
Last active September 5, 2021 02:51
Generate Typescript React Provider
import React, { useContext, useState } from 'react';
type GeneratedExampleContextValue = {};
type GeneratedExampleContextType = [
GeneratedExampleContextValue,
React.Dispatch<React.SetStateAction<GeneratedExampleContextValue>>
];
const defaultProviderValue: GeneratedExampleContextValue = {};