Skip to content
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

Way to determine the render context on the fly #12

Closed
bluepnume opened this issue Jun 18, 2016 · 1 comment
Closed

Way to determine the render context on the fly #12

bluepnume opened this issue Jun 18, 2016 · 1 comment

Comments

@bluepnume
Copy link
Collaborator

There are situations where we need to figure out what render context we want to use, on the fly in the parent page.

For example: for PayPal Checkout, if the user is one-touch logged in, we render checkout in a lightbox iframe, otherwise we use a popup window.

One possibility is to add a method like:

determineContext() {
    return someContextDeterminingPromise();
}

The only problem with this is it begins to add runnable code / logic to the parent page, which I'm not sure if we want to do for xcomponent

@bluepnume
Copy link
Collaborator Author

Probably best if we just allow people to mutate Component.contexts for now in an async way, if they want. Anything else is just going to be too complicated given that we always need to open popup windows synchronously on button click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant