derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 117 forks source link

Reactive functions don't seem to run when input path points to filtered & referenced data #222

Closed dadisn closed 3 months ago

dadisn commented 9 years ago

There seems to be an issue with how reactive functions work with filtered and referenced data as input. When setting up a reactive function with an input path that points to data that has been filtered from a database and then referenced to that path, the reactive function only runs initially but not when changes occur. This is at least an issue when the input path is an array, but I have not tested other scenarios.

Please see the app "derby-bugreport2" from https://github.com/dadisn/derby-bugreport for more details. For code you can go to https://github.com/dadisn/derby-bugreport/tree/master/apps/derby-bugreport2. To reproduce the error, you should be able to clone that repo, run npm install and go to http://127.0.0.1:3000/bugreport2 to try it out.

Then you should be able to see that changing an object that is filtered and referenced does not trigger any reaction from the reactive function. However, when the same function is bound to an input path that contains locally set data, the reactive function works as intended.

craigbeck commented 3 months ago

Thanks for your contributing your issue.

We have recently been actively updating the Derby and Racer packages, and both repos are now in Typescript and published with types on npm. As we have quite a few old issues open we have made the decision to close out of date issues.

If this issue still matters to you we encourage reproducing against the current versions of the repo and opening a new issue.