gabrielcsapo / gabrielcsapo/docusaurus-plugin-search-local

Bug: cannot update state error in browser

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
27
Forks
9
PR merge metrics
No merged PRs in 30d

Description

## 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.