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
using mobx between window and iframe #1644
Comments
Please create a small test case using codesandbox.io. You'll probably have
to create 2 sandboxes for your issue.
…On Fri, Jul 20, 2018 at 4:30 AM Jess ***@***.***> wrote:
*A question*
I have a store in *top* window, and I passed store into an iframe which
is same origin.
when I change store properties in top window, my React component do not
update.
does mobx support using with iframes?
thx
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1644>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIrcvnj8xDG25qETfBvHRclcYejLdSvks5uIaM2gaJpZM4VXuzX>
.
--
-Matt Ruby-
mattruby@gmail.com
|
@mattruby I've created two pages with codesandbox.io, this is parent page and this is iframed page . But iframed page does not work as expected. maybe something went wrong in such situation. in top page, I've expose in iframed page, I try to access two when I update store in top page, only the second |
@sophister it is because you are using two different instances of MobX, which both have their own internal state. Instead of having mobx as a dependency in the framed page, you should pass mobx from the parent to the framed page (not that this is possible only if they are on the same domain, otherwise browser security will prevent this) |
@mweststrate get it, thx a lot |
i have the same question, are you solved the problem by the method? |
@umbrellaZwl You need to elaborate on what you have tried and did not work for you. Also, please don't comment on old & closed issues as only a few people will see that. Open a new issue with all details of your problem. |
A question
I have a store in top window, and I passed store into an
iframe
which is same origin.when I change store properties in
top
window, myReact
component within iframe do not update.does mobx support using with iframes?
thx
The text was updated successfully, but these errors were encountered: