docusaurus-plugin-search-local
docusaurus-plugin-search-local copied to clipboard
Bug: cannot update state error in browser
Bug Description
React DevTools throws when attempting to go to a search result on first load of the application.
Warning: Cannot update a component (`SearchModal`) while rendering a different component (`SuggestionTemplate`). To locate the bad setState() call inside `SuggestionTemplate`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
Steps to Reproduce
- load a site using the docusaurus plugin
- open dev tools
- open the search modal
- type a search that has result
- hit the
enter
key to go to the selected result - error is produced in dev tools
