I want to call a different hook according to a variable... this value comes from URL parameters and is dynamic, but hooks can't run conditionally according to Hook's rules:
Example
// this hook comes from react-router dom to get the URL params
const param = const { productType, accountId, statementId } = useParams();
// I need to run a hook that calls a different API according productType value
if (productType === 'someType') {
return useHookOne(accountId, statementId)
} else if (productType === 'otherType') {
return useHookTwo(accountId, statementId)
} else {
return useHookThree(accountId, statementId)
}