A React Provider which allows Components to be rendered outside of an App's React tree.
React component
BaseProvider
View sourceimport React from 'react';import ReactDOM from 'react-dom';import {BaseProvider} from '@airtable/blocks/ui';function getHtmlStringForRecordCard(base, record) {return ReactDOM.renderToStaticMarkup(<BaseProvider value={base}><RecordCard record={record} /></BaseProvider>);}
Props
interface BaseProviderProps
children | React.ReactNode The contents to render. |
value | Base The {@Base} instance associated with the App. |