Giter Club home page Giter Club logo

Comments (5)

dustingetz avatar dustingetz commented on August 10, 2024

We played around with that. We feel that mori has a significant cost - it adds a cross cutting concern of "Which type is the array that I'm looking at?", and the benefit does not outweigh that cost. React.addons.update is plenty fast for the type of application most people are building; the people who actually need full mori performance are the type of team that is already enjoying ClojureScript in the first place.

from react-cursor.

DjebbZ avatar DjebbZ commented on August 10, 2024

Not sure I understand the cross-cutting concerns problem.

And what about the Facebook lib ? My understanding is that it's meant to play well with React.

Thanks for the answer by the way.

from react-cursor.

dustingetz avatar dustingetz commented on August 10, 2024

It means at any given time, our objects can either be an immutable array or a JS array, and we don't have a type system to help us know the difference. Try it out in a nontrivial js app and you will see what I mean.

from react-cursor.

DjebbZ avatar DjebbZ commented on August 10, 2024

Oh, I get it. Basically you're saying it makes mori usable only where you have total control of your data. Or you pollute your code with lot of tests/conversion.

Strange, I just looked again at the mori docs and it says most function works on JS types as well.

from react-cursor.

j201 avatar j201 commented on August 10, 2024

This is a problem that's been bugging me recently, so I'm taking a stab at a library that will allow you to use arbitrary data structures as cursors: https://github.com/j201/react-precursor. In addition to mori, I'm interested in using data structures from Facebook's immutable library.

Anyway, I'm not sure it'll be possible to apply some of the aggressive optimizations that are in react-cursor, but it should provide a basic usable implementation of mori cursors.

from react-cursor.

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.