react >= 18
npm install --save fast-react-context
import React, { Component } from 'react';
import createFastContext from 'fast-react-context';
const { Provider, useStore } = createFastContext({
title: 'App Fast Context',
});
const ChildComponent = () => {
const [title] = useStoreTitle((store) => store.title);
return <h5>{title}</h5>;
}
export default const App {
return <Provider>
<ChildComponent />
</Provider>;
}