Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
const { config } = this.props;
// This initialization is done inside of componentDidMount, because initializing the SearchDriver server side
// will error out, since the driver depends on window. Placing the initialization inside of componentDidMount
// assures that it won't attempt to initialize server side.
const driver = new SearchDriver({
...config,
a11yNotificationMessages: {
...defaultA11yMessages,
...config.a11yNotificationMessages
}
});
this.setState({
driver
});
}
export default function reactSearchUi() {
reactSearchComponents();
searchUi();
}