#mikeyo_docs

1 messages ยท Page 1 of 1 (latest)

strong nicheBOT
#

๐Ÿ‘‹ 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.

coral rapids
#

hi there, give me awhile to catch up

magic atlas
#

Hi there, I'm also an engineer from Stripe. I'm taking over this thread.

narrow canyon
#

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?

magic atlas
#

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.

narrow canyon
#

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]=

magic atlas
narrow canyon
#

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

magic atlas
#

What modal are you referring to?

narrow canyon
#

the modal which contains the OnboardingView

#

linking to it using this query string seems to work -> ?app_onboarding=true&apps[com.example.app][modal]=

magic atlas
#

Ah, I see, so you want to dismiss the modal once the onboarding is completed.

narrow canyon
#

exactly yes - using a Link to clear the query string works

magic atlas
#

Sounds great!

strong nicheBOT
narrow canyon
#

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

slow raft
#

hi! I'm taking over this thread.

#

let me know if you have other questions

narrow canyon
#

hey thanks - i would be interested to know if there is a way to pass my own context around?

slow raft
#

can you clarify what you mean by this? is this about getting the app name you mentioned above?

narrow canyon
#

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

slow raft
#

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.

strong nicheBOT
crimson dune
#

๐Ÿ‘‹ 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

Test your Stripe app UI with a set of utilities and helpers.