Gravity Forms React Utils
Custom React utilities for Gravity Forms development.
Installation
Install the module
npm install @gravityforms/react-utils --save
Note: This package requires node
20.10.0 or later, and npm
10.2.3 or later.
Overview
A collection of JavaScript utilities that we use in our React.
Usage
Example:
import { create } from '@gravityforms/react-utils';
const createZustandStore = ( data ) => {
const initialState = getConfig( config, 'gform_admin_config' ) || {};
const storeActions = ( set ) => ( {
closeDialog: () => set( () => ( { isOpen: false } ) ),
} );
const useStore = create( initialState, storeActions );
}
Documentation
The documentation for this package is available at http://docs.js.gravity.com/