When calling React.memo the memoised value should change when any of the used values change. In the generated route modules the useIsRouteActive function uses React.memo based on the location and exact key but the exact key is not part of the arguments array. This means that if a user writes the following code:
let [exact, setExact] = useState(false);
let isActive = Route.useIsRouteActive(exact);
The isActive may not change in case the exact input is changed.
When calling
React.memo
the memoised value should change when any of the used values change. In the generated route modules theuseIsRouteActive
function usesReact.memo
based on thelocation
andexact
key but theexact
key is not part of the arguments array. This means that if a user writes the following code:The
isActive
may not change in case theexact
input is changed.