Coder Social home page Coder Social logo

Comments (5)

mweststrate avatar mweststrate commented on May 18, 2024

I didn't built a react-native project myself using mobservable, but I know there are some people on the gitter / reactiflux channel who did so probably you can ask around in these channels.

Besides that, integration mobservable with react native is really easy; just use the @observer decorator on your react native components instead of on JSX based components, that should be all. If you don't use ES6 syntax, just pass your components through observer: var myNativeComponent = mobservableReact.observer(React.createClass({ .. }));

from mobx-react.

jjchula avatar jjchula commented on May 18, 2024

I've tried but it didn't work.

"import observer from mobservable-react/native" and "export default observer(myComponent)" didn't make the trick. It ends up in different errors for different versions of react native. So I might miss something.

A working demo would greatly help.

from mobx-react.

mweststrate avatar mweststrate commented on May 18, 2024

Note that it should be ..import {observer} from
"mobservable-react/native".. If that doesn't help I'm gonna try to find
somebody who uses it with native for you :)

On Wed, Jan 20, 2016 at 3:08 AM, jjchula [email protected] wrote:

I've tried but it didn't work.

"import observer from mobservable-react/native" and "export default
observer(myComponent)" didn't make the trick. It ends up in different
errors for different versions of react native. So I might miss something.

A working demo would greatly help.

โ€”
Reply to this email directly or view it on GitHub
#16 (comment)
.

from mobx-react.

jjchula avatar jjchula commented on May 18, 2024

Right! It's working now. Many thanks.

I was too lazy so I took the code from README.md. Noted the broken link.

Installation

...
import observer from 'mobservable-react';
// - or -
import observer from 'mobservable-react/native';

This package provides the bindings for Mobservable and React. See the broken link for how to get started.

from mobx-react.

mweststrate avatar mweststrate commented on May 18, 2024

Ouch, that's really embarrassing. Fixed it. Thanks for reporting!

from mobx-react.

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.