<DynamicContextProvider
settings={{
handlers: {
handleUserOnboarding: async (missingFields: UserOnboardingFieldRequest[]) => {
console.log("handleUserOnboarding was called", missingFields);
/** Example
* missingFields: [
* {
* key: 'email',
* required: true,
* isCustom: false, // only true for custom fields
* },
* {
* key: 'city',
* required: false,
* isCustom: true, // only true for custom fields
* label: 'City',
* }
* ]
*/
// TODO: collect user information to return to dynamic
// Note: isCustom value should be the same as the one received
return [
{ key: 'email', value: 'email@test.com', isCustom: false },
{ key: 'city', value: 'New York', isCustom: true },
];
},
},
}}
>
{/* ... rest of your app ... */}
</DynamicContextProvider>