Comments (5)
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.
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.
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.
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.
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)
- destroy function? HOT 4
- warning using React 14 dev build HOT 5
- can a refined cursor call forceUpdate on the proper react node to bypass trickle down rendering? HOT 2
- improve build targets HOT 2
- 2.0 branch broke cursor ref equality against react components HOT 1
- extract react-addons-update wrapper into a standalone library
- update react-json-editor example
- ImmutableOptimizations needs default argments
- implement refToHash with weakmap
- discus flux in the readme HOT 1
- The unminified build does not produce a UMD module HOT 1
- ImmutableOptimizations should respect react state HOT 1
- Add example as jsfiddle HOT 10
- Make ImmutableOptimizations available without a mixin
- Add assertion preventing function references inside cursors HOT 2
- remove omit-keys dependency, clean up util.js HOT 1
- add syntax sugar for remove-at-index HOT 2
- allow refine&set to create key if not existant HOT 2
- Problem with fresh npm install HOT 7
- document WeakMap dependency (or polyfill)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-cursor.