Expose function to reset the state
Currently, once the complete event is fired, the list becomes stale and doesn't load more items, even if the list expands. The easy solution would be to either expose the state directly or a function setState(state: string) to call on the ref.
updating the state after calling the complete function wouldn't do noting as the observer gets disconnected
you can use the identifier prop to get the desired behavior, whenever the identifier changes the observer gets started again and the infinite event would be triggered if the component is intersecting.
updating the state after calling the
completefunction wouldn't do noting as the observer gets disconnected you can use theidentifierprop to get the desired behavior, whenever the identifier changes the observer gets started again and the infinite event would be triggered if the component is intersecting.
Ah great, but would the state not also be reset?