Coder Social home page Coder Social logo

observ's People

Contributors

colingourlay avatar neonstalwart avatar nichoth avatar nick11roberts avatar raynos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

observ's Issues

Interop: implement Symbol.observable?

Since reactivity is emerging pattern in JS ecosystem, wouldn't it be nice to come to common ground?
observable/observ are now the main alternative observable API, compared to the proposal.
If observ implemented Symbol.observable, it would enable interop and make one more step towards standard reactive pattern.

The path..

Hi,

Question; when onchange fires, would it be an idea to pass the "path" of the element that triggered the onchange? Or to in some other way be able to filter the event.

The use cases would perhaps be when dealing with multiple deep brances, when dealing with "live" data being pushed to the client, or when heavy manipulation of the data is done on the way to the view...

Efficient implementation of `computed`

It's possible to implement an efficient computed that does branch detection and only re-evaluates the computed function when it's real dependencies changes.

see http://www.youtube.com/watch?v=mVjpwia1YN4#t=12m32s for reference on this issue

Currently

var d = computed([a, b, c], function fn(a, b, c) {
  return a ? b : c
})

fn get's called when a is true and c has changed. In that call path it returns b and the result of d is the same.

If we could write something like

var d = cleverComputed(function () {
  return a() ? b() : c()
})

In this case d can internally remember that it depends on a and b in the a === true branch and will not re-call itself when c changes. However when a changes d will set its internal dependencies to a and c instead.

not sure how to do this without a global state machine.

cc @Matt-Esch

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.