ref object that can be used to access the context of a form


contextRef is a <Feathery.Form> prop that will set the current property of a ref to an instance containing form state and functions useful for interacting with the form.


You can set the current form step, update a field value, get the current step name, and more.

import { useRef } from 'react';
import { init, Form, FormContext } from '@feathery/react';

function App() {
  // Initialize Feathery
  init('SDKKey', '');
  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
    // Fetch the Feathery form context

Last updated