mobxjs / mobx-examples Goto Github PK
View Code? Open in Web Editor NEWA collection of simple mobx examples
License: MIT License
A collection of simple mobx examples
License: MIT License
person {} => people []
thanks mattruby
would like to learn more from u ~~~
Maybe you could fix them up?
In Chrome and FF I'm seeing Uncaught ReferenceError: mobx is not defined
in the browser console for several examples including:
here is the demo link
https://codesandbox.io/s/y3p029qqzj
in the console panel it runs 11 times not 10 times as expected
Hi i test code like below,but it got undefined,i use latest umd mobx code,thanks for your help,
var Person = function (firstName, lastName, age) {
this.id = .uniqueId('person');
mobx.extendObservable(this, {
firstName: firstName,
lastName: lastName,
age: age,
fullName:function () {//error code
console.count('fullName');
return this.firstName + ' ' + this.lastName;
}
});
};
var person = new Person('Matt', 'Ruby', 0);
mobx.autorun(function () {
console.log(person.fullname);//get undefined
});
Hi @mattruby ,
Thanks for these examples, it helps me a lot to start with mobx.
A variation of the 00-todo example without mobx-react
, just mobx
and react
could be very nice.
I like your examples because they are really simple and doesn't use the @observable
syntax.
In the same way, a really simple example (the 00-todo
is perfect) wihtout the hidden magic of mobx-react
could be very helpfull
@mattruby Do you have exmaples implemented for createViewModel?
has some examples run in mobx v5? This demo is all runing in mobx v3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.