TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published


This library exposes react hooks and utilities to simplify writing React clients for CubicWeb applications.

As the name suggests, those utilities focus primarily on building forms. They build upon react-hook-form for form handling and yup for form validation.


@cubicweb/react-form-utils is available from NPM:

# With NPM
npm i @cubicweb/react-form-utils
# Or with Yarn
yarn add @cubicweb/react-form-utils


This library exports 4 main utilities:


You can find the full documentation with examples here.

Notes on relations

For JS objects representing entity values returned by useGetCubicWebEntity and useCubicWebForm, the relations are represented using the following format:


So if you want to build a component handling a relation with several object types, you must be careful to edit all the possible keys in the JS object.

This is a limitation from @cubicweb/data-provider, while we are working on removing this behavior, it is still a work in progress which may take time.

On the other hand, when passing relations to ignore in the omittedFields parameter, you use the relation type with an optional reverse_ prefix in case the current entity is object of the relation.

You never mention the subject/object. This is the behavior we want to achieve for the JS objects in the helpers.


All @cubicweb libraries are in the cubicwebjs monorepo. Please refer to the main README.

Get Help

Contact us on Matrix and check the roadmap on the CubicWeb Repository.

Package Sidebar


npm i @cubicweb/react-form-utils

Weekly Downloads






Unpacked Size

95.7 kB

Total Files


Last publish


  • fbessou
  • famarger
  • nchauvat