Skip to content
Advertisement

Tag: use-effect

Getting undefined props in functional react components

How to pass the {requests} prop to the RequestRow component after executing the setRequests? My understanding is that the requests get initialized as undefined in the beginning and before being set with the asynchronously called object, it gets passed to the RequestRow component as undefined, and the error occurs. The RequestRow component is shown below. It takes in the {requests}

Rendered more hooks than during the previous render REACT.js

I have an issue, I’m trying to set a value to a state (selectedPathway) regarding the another const (countryLabel) that is set via redux. Once “selectedPatway” is set, I would like to display the result in <Select value={selectedPathway} /> This Select is return by the main component that surround all the logic. Everything works well but when I refresh the

Advertisement