Hacker News new | ask | show | jobs
by austinbirch 1403 days ago
The rules engine direction is definitely an interesting one, hopefully there’s more exploration into that in the future.

For my needs now I actually wrote something pretty hacky[1] to get a 'reactive' version of DataScript’s Entity API.

As Nikita mentions in the article, I’ve found that most of the time I don’t really need queries in the UI, and so the entity API ends up fitting quite well – except that it’s non-reactive.

The `reactive-entity` library implements a reactive version of (most of?) the entity API, so you can pass entities in/through components, and then the components only re-render when the attributes accessed within those components change (including attributes accessed on other entities through refs).

Loads of room for improvement but I’ve used it successfully in a couple of projects.

[1]: https://github.com/austinbirch/reactive-entity