3 ms·
Does anyone know if you can do this in reactjs? It would be awesome to build a excel like spreadsheet with user-input formulas.
by sandGorgon 10y ago
Does anyone know if you can do this in reactjs? It would be awesome to build a excel like spreadsheet with user-input formulas.
- danthejam 10y agoAs another poster said, you can use Meteor's Tracker and ReactiveVar modules to do it. Here's a standalone package that doesn't require the Meteor platform: https://www.npmjs.com/package/meteor-standalone-tracker https://www.npmjs.com/package/meteor-standalone-tracker
- untog 10y agoWouldn't it be backwards to do this in React? Everything is controlled by a state object you manually set, so you already know when values are going to change.
- sandGorgon 10y agoactually - I'm talking about a function expression. Think about a spreadsheet with a formula similar to "=SUM(A1+B1)". What this means is that when A1 or B1 change.. then this formula result should get re-computed. Remember that A1 and B1 themselves may be computed results... what happens today is that I need to recompute ALL formulas - because there is no easy way to know which formulas changed.
- nunyabuizness 10y agoCheck out MobX, as it comes with React bindings to re-render components when their reactive dependencies change: https://github.com/mobxjs/mobx https://github.com/mobxjs/mobx
- goldenkey 10y agoCheck out https://www.npmjs.com/package/watchjs https://www.npmjs.com/package/watchjs
- egeozcan 10y agoThere is Baobab[1] - it is a single state-tree approach, while supporting computed values in the tree and has a react adapter[2]. [1]: https://github.com/Yomguithereal/baobab#computed-data-or-monkey-business https://github.com/Yomguithereal/baobab#computed-data-or-mon... [2]: https://github.com/Yomguithereal/baobab-react https://github.com/Yomguithereal/baobab-react
- gagege 10y agoHow about RxJS? https://github.com/Reactive-Extensions/RxJS https://github.com/Reactive-Extensions/RxJS