This is a wrapped Wert initializer helper for React projects.
yarn add @wert-io/module-react-component
or
npm install @wert-io/module-react-component
import WertModule from '@wert-io/module-react-component';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
wertOptions: {
partner_id: '{{YOUR_PARTNER_ID}}',
listeners: {
loaded: () => console.log('loaded'),
},
...
},
};
}
render() {
return (
<div className="app">
<WertModule
options={this.state.wertOptions}
/>
</div>
);
}
}
You can find the Whole list of options here.
Component reacts to options.theme and options.color_{name} values change and ignores others.