When handling the asynchronous request with react and redux , i am facing some issues . So when i make a ajax request till the request gets completed we need to render the default state . so when the request is completed the state is updated in the redux store and the app re-renders . Now what i am facing is that ,
- till the request gets completed , state is null - render as loading
- if the response is an empty [ ] - then render saying the details are not found for this id .
- if the response is not an empty array - then render the details .
How to handle the step 2 , i am getting the error at step 2 . “DOMException: Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of this node.”
This is my repo ,