Open huyansheng3 opened 2 years ago
pass your dataA to second useSSE in array, its dependency array so your second call should be:
const [dataB, error] = useSSE(() => {
return fetch("https://myapi.example.com", {params: dataA.id}).then((res) => res.json());
}, [dataA]);
A :
B:
query need dataA , how handle this condition ?