docusaurus-plugin-search-local icon indicating copy to clipboard operation
docusaurus-plugin-search-local copied to clipboard

Bug: cannot update state error in browser

Open lbdm44 opened this issue 3 years ago • 0 comments

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

  1. load a site using the docusaurus plugin
  2. open dev tools
  3. open the search modal
  4. type a search that has result
  5. hit the enter key to go to the selected result
  6. error is produced in dev tools
Screen Shot 2022-02-10 at 1 44 40 PM

lbdm44 avatar Feb 10 '22 21:02 lbdm44