You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting the test function for the frontend it returns an error saying:
./src/templates/dataset/index.jsx
Line 35:6: React Hook useEffect has a missing dependency: 'item'. Either include it or remove the dependency array react-hooks/exhaustive-deps
The error could be solved by extending the code in ./src/templates/dataset/index.jsx with }, [id, state, item]);.
So the function looks as follows:
useEffect(() => {
if (window !== undefined) {
checkForWindow(true);
}
async function getItem() {
const { data } = await axios.get(`${process.env.REACT_APP_ROOT_URL}/metastore/schemas/dataset/items/${id}?show-reference-ids`);
setItem(data);
console.log("item: ", item);
}
if (!state || !state.dataset) {
getItem();
}
}, [id, state, item]);
This may fix the error message but still the page will not be created.
The text was updated successfully, but these errors were encountered:
When starting the test function for the frontend it returns an error saying:
The error could be solved by extending the code in
./src/templates/dataset/index.jsx
with}, [id, state, item]);
.So the function looks as follows:
This may fix the error message but still the page will not be created.
The text was updated successfully, but these errors were encountered: