@gravityforms/react-utils

3.2.1 • Public • Published

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. Function docs site to come.

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/

Package Sidebar

Install

npm i @gravityforms/react-utils

Weekly Downloads

107

Version

3.2.1

License

GPL-2.0-or-later

Unpacked Size

53.4 kB

Total Files

21

Last publish

Collaborators

  • nickpelton
  • carlhancock
  • mbelenmontoya
  • laborin
  • sswebster
  • ryanurban
  • paulmskim
  • sherifmesallam
  • alexcancado
  • wpalchemist
  • speerface
  • faction23