Skip to content

v8.11.1

Choose a tag to compare

@ericreis ericreis released this 16 Jan 12:36
· 3070 commits to master since this release

Changed

  • Conditions Modify object atom prop to allow developers to pass extra
    parameters to the render function. Now instead of passing a function to the
    object prop you need to pass an object with the following structure:

    const options = {
      ...
      verbs: [
        {
          ...
          object: {
            renderFn: foo,
            extraParams: {
              a: 1,
              b: 2,
              ...
            }
          }
        },
      ]
    }

    The extraParams property will be available in your render function as a
    parameter like the example below:

    foo = ({ statements, values, statementIndex, error, extraParams }) => {
      // here goes the render logic of you object component
    }