Embedding
Learn how to include your Mason features in your application.
If you haven't already, run through our developer quickstart to get your development environment ready to use Mason.
Props
Mason features take a number of user-defined properties.
id
- a 24 byte string from the Mason Builder export modal (required)willFetchData - a function invoked before datasource fetching (optional)
willSendData - a function invoked before form submission (optional)
didReceiveData - a function invoked after form submission (optional)
React
Mason features use React under the hood, and integrate easily with a React codebase.
HTML
If you're including Mason features as HTML Custom Elements, you must pass your props as data attributes.
Because you can't pass functions as HTML attributes, you must use event subscribers to utilize callbacks with your HTML feature. See Sending Data, Fetching Data, and Handling Errors for examples.
Last updated