-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify useRenderCampaigns #89
Conversation
@@ -38,7 +36,8 @@ export default function NostoOrder(props: { | |||
.load() | |||
renderCampaigns(data, api) | |||
}, | |||
[recommendationComponent, pageTypeUpdated] | |||
[order], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
order was missing
renderCampaigns(data: unknown, api: NostoClient): void | ||
pageTypeUpdated: boolean | ||
} | ||
pageType: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not anymore used
recommendationComponent?: React.ReactElement<{ | ||
nostoRecommendation: Recommendation | ||
}> | ||
useRenderCampaigns(type: string): { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to standalone hook that uses context internally
ca470a9
to
fcbbc48
Compare
1d5f133
to
35c0872
Compare
Extracts useRenderCampaigns out of the main context and reduces the rerun conditions for the Session API side effects