Git Product home page Git Product logo

Comments (8)

solkimicreb avatar solkimicreb commented on September 2, 2024 1

I can look into adding an internal mobx like fallback when Proxies are not available. The fallback would display a warning. If it is using the fallback, you would need to use predefined stores just like with mobx to avoid expando props.

Edit: The API and the async nature would remain the same

from observer-util.

SukantGujar avatar SukantGujar commented on September 2, 2024 1

Sure, thanks for all the help and support you provided during my tryst with nx-observe. Its a wonderful library and I am eagerly hoping it sees wide usage.

We have been able to adapt our code to use MobX for the time being, but like I said, its not as transparent and so we have kept the dependencies to a minimum to allow us to switch over to nx-observe when RN starts supporting it.

from observer-util.

solkimicreb avatar solkimicreb commented on September 2, 2024

Ouch, Proxies can't be polyfilled. The polyfills are using getter/setters (just like mobx). This means that expando properties, delete operations and loops won't work. for of loops can be hacked around to work, but the rest is impossible to do as far as I know.

from observer-util.

SukantGujar avatar SukantGujar commented on September 2, 2024

😯 the product I am working on aims to have cross platform flux store.

I am following up with RN team on this. Apparently, only Android devices and iOS 9 and lower are impacted. They use iOS8 JSC engine on Android, which doesn't have native Proxies among several other things. We cannot afford to lose Android platform.

Looks like JS disparities will never stop haunting us... Hate to look out for another store simply because I am stuck in a time where RN hasn't updated JSC in over two years...

The features which cannot be polyfilled are what give nx-observe the edge over Mobx. The only alternative I am left with is to go back to immutable based store which will screw up member access simplicity. Imagine store.auth.user vs store.getIn(["auth", "user"]). 😞

The greatest irony would be by the time the product is out, native Proxy maybe supported in some form in RN 😒.

from observer-util.

solkimicreb avatar solkimicreb commented on September 2, 2024

I know, it is really a struggle. I think your original issue with mobx (conditionals not being observed) is fixed though. It has nothing to do with proxies. Maybe you could give it another go.

from observer-util.

SukantGujar avatar SukantGujar commented on September 2, 2024

Compared to nx-observe, I find MobX complicated to work with. Things like expandos which are key to our application work ootb here, while we had several scary moments with extendObservable. The fact is, Proxy makes meta programming much easier than earlier workarounds, plain and simple.

from observer-util.

solkimicreb avatar solkimicreb commented on September 2, 2024

I am closing this issue now. I will open a more general issue for partial legacy platform support when I have some time. (Full support for pre ES6 platforms is not possible.)

Thanks for opening it though, I didn't know that RN uses an old JSC on Android.

from observer-util.

solkimicreb avatar solkimicreb commented on September 2, 2024

Thx for all the support and bug finds. It was extremely helpful!
I will let you know, if I make some kind of legacy feature.

from observer-util.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.