1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 06:44:21 +00:00

🔧 Fix ResourceRouter, as the previous behaviour is no longer needed

This commit is contained in:
Steffo 2021-10-10 17:02:05 +02:00
parent 559499ae44
commit 30b2091b97

View file

@ -24,7 +24,6 @@ export function ResourceRouter<Resource>({selection, unselectedRoute, selectedRo
const UnselectedRoute = unselectedRoute
const SelectedRoute = selectedRoute
// This component **intentionally** has a incomplete dependency array to avoid routes being re-rendered every time the parent changes.
return React.useMemo(
() => {
if(selection) {
@ -36,7 +35,6 @@ export function ResourceRouter<Resource>({selection, unselectedRoute, selectedRo
<UnselectedRoute/>
)
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[selection],
[selection, selectedRoute, unselectedRoute],
)
}