Read full document for react-hook-use-cta
on documentation website
npm i react-hook-use-cta
yarn add react-hook-use-cta
deno add jsr:@rafde/react-hook-use-cta
import { useCTA, } from 'react-hook-use-cta';
const [
history,
dispatch
] = useCTA({
initial: {
value: 0,
},
});
import { createCTA, } from 'react-hook-use-cta';
const [
history,
dispatch
] = createCTA({
initial: {
value: 0,
},
});
import { createCTAContext, } from 'react-hook-use-cta';
const context = createCTAContext({
initial: {
value: 0,
},
});
export const CTAProvider = context.CTAProvider;
export const useCTAHistoryContext = context.useCTAHistoryContext;
export const useCTADispatchContext = context.useCTADispatchContext;