contextRef
ref object that can be used to access the context of a form
Overview
Usage
import { useRef } from 'react';
import { init, Form, FormContext } from '@feathery/react';
function App() {
// Initialize Feathery
init('SDKKey', '[email protected]');
const context = useRef<FormContext>(null);
// After the Form is rendered, and the ref is set, you can
// access any of the properties listed below
setTimeout(() => context.current.setStep('New Step'), 1000);
// Show the `aBcDeF` Feathery form
return <Form
formId='aBcDeF'
// Fetch the Feathery form context
contextRef={context}
/>
}Last updated
Was this helpful?