prop only changing with new object...should have knowne

This commit is contained in:
talksik
2022-05-07 13:31:30 -05:00
parent d8ece9eb51
commit a41753b574
5 changed files with 17 additions and 15 deletions
@@ -344,10 +344,12 @@ export function LineDataProvider({ children }) {
// ?just do simple synchronous axios/fetch in useEffect and manage isLoading ourselves?
const { data: basicUserLinesData } = useUserLines();
// ! passing in the same data of the query passes reference so changes that happen in socketHandler impact react query cache
const { linesMap, ...handlers } = useSocketHandler(
basicUserLinesData?.data?.masterLines
);
// avoid children rendering if they don't have the ws to make individual calls with
if (!$ws) {
return <span>attempting to connect you for the here and now...</span>;
}