React InstantSearch - AlgoliaHighlighter(Highlight) - setState(..)Warning

Hi, I am using react-instantSearch with the connectAutoComplete connector using react-autosuggest. I am getting the following warning message:

setState(…): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the AlgoliaHighligher(Highlight) component.

This occurs when the hits (suggestions) list changes when typing a search input. I want to note that the Highlight component is nested withing the suggestion render component child components. If I unnest the Highlight component and move it to the parent component the warning seems to go away.

Please let me know if there might be a solution for this or if you might need additional information.


Hi @mmojica,

Can you tell me which version of react-instantsearch are you using?

I started to notice those messages within storybook either (but not on our live demos). I’ll investigate and let you know what I can find. In the meantime could you open this issue on our github? That way you’ll be able to follow his resolution.


Thanks @marielaure.thuret !

The version of react-instantsearch is 4.0.4. I will going ahead and open this issue on the github. Please let me know if you find anything.

I also made a code sample/repo that displays the warning message in case it may help with investigating.