There are several functions that you can use that across all expressions in Rhythm.
Dates
The date-fns library is used and all date functions in this library are accessible via expressions.
setValue( property ,newValue)
This lets the caller change the value of the context provided.
setValue( context.definition.pages[0].components[0], 'heading_text','We successfully modified the component via the hook.');
arrayIncludes( array, value)
Checks to see if an array includes a value.
arrayIncludes ( [1,2], 1); // evaluates to true
arrayIncludes ( [1,2], 0); // evaluates to false
arrayIncludes ( null, 1); // evaluates to false
logToConsole( value1,value2...)
Shows the specific values in the console log. Helpful when attempting to debug expressions.
logToConsole('Hello world!');
Comments
0 comments
Article is closed for comments.