-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
Hello,
I want to change my location from message -> message/:channelId when the user clicks on the channel. But I face with the problem that every time location changes (eg: message/channel1 -> message/channel2). I find it out because this line in usePaginatedChannels.js. useEffect always run because it can't compare filters. (line 82) I replace it with use-deep-compare-effect and it work.
useEffect(() => {
queryChannels('reload');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [filters]);
To
import useDeepCompareEffect from 'use-deep-compare-effect'
useDeepCompareEffect(() => {
queryChannels('reload');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [filters]);
Sorry wrong repo. I will close this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels