#mikeyo_docs
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1412324475831058553
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, give me awhile to catch up
Hi there, I'm also an engineer from Stripe. I'm taking over this thread.
The OnboardingView won't dismiss automatically when the completed is true, Once your user have completed the onboarding, you can hide the OnboardingView by replacing it with null. see https://docs.stripe.com/stripe-apps/onboarding#display-your-view
thanks Jack - this makes sense. I have a couple of follow ups:
1: what is the purpose of the completed flag?
2: if the user is not onboarded we can "display a button to launch your onboarding appropriately." - how can we launch the OnboardingView via a button click?
The completed flag is basically telling the OnboardingView whether your user have completed the onboarding.
You can use conditional rendering (https://react.dev/learn/conditional-rendering) to show/hide a Component based on your user's onboarding status. For instance, let's say you have a state variable called isOnboardingStarted, and you should OnboardingView if isOnboardingStartedis true.
yes i understand this - this step is fine I am testing it atm. still unclear what the point is of passing the completed flag as it doesn't seem to do anything but ๐คทโโ๏ธ its not an issue. I am still unclear how i can push the user into the onboarding flow or "display a button to launch your onboarding appropriately". I am really interested in the handler for this button given we need to push the user to a route like /dashboard?app_onboarding=true&apps[com.example.app][modal]=
Ok, so you want to add a link to redirect user to a specific Dashboard URL https://docs.stripe.com/stripe-apps/components/link ?
lets try that
unfortunately conditionally rendering the OnboardingView inside our AppOnboarding does not work to close the modal instead it is rendering an empty modal (which makes sense). As a developer I dont seem to have access to the modal itself (I don't think). However lets try the link approach here as well
What modal are you referring to?
the modal which contains the OnboardingView
its invoked automagically after first install https://docs.stripe.com/stripe-apps/post-install-actions#link-to-onboarding
linking to it using this query string seems to work -> ?app_onboarding=true&apps[com.example.app][modal]=
Ah, I see, so you want to dismiss the modal once the onboarding is completed.
exactly yes - using a Link to clear the query string works
Sounds great!
similarly a link or a button with href can be used to relaunch the modal. it would be helpful to have the app name (eg com.example.app) present in the appContext to construct the query string
hey thanks - i would be interested to know if there is a way to pass my own context around?
can you clarify what you mean by this? is this about getting the app name you mentioned above?
the appName would be helpful as there is a couple of cases where we need this value to route the user (eg open onboarding or open settings) and reading from the appContext would avoid keeping a constant for the app name (which might change when productionizing the app). my follow up was more general and relating to reacts context API - if there is an entry point where i can wrap my entire app in a context provider
not sure, give me a few minutes to look into this.
did you encouter a specific issue when trying to use context? it should be possible to use one.
๐ taking over for my colleague. Let me catch up.
so basically as shown in this example your UI view consists of a normal react app that you could expect to behave as such. meaning that you could wrap your entire JSX with the context provider you wish to use