Registering a data provider
To register a block with the Chai Data Provider, follow these steps.
Arguments
Unique name - string
- The unique name of the data provider. This is used to identify the data provider in the Chai Builder App.Options - object
name - string
- The readable name of the data providerdescription - string
- The description of the data providerdataFn - function
- The function that returns the data. This is used at build time. User can fetch data from any external source and return it.mockFn - function
- The function that returns the mock data. This is used in the builder mode. THis is useful to avoid making external API calls in builder mode.