Fork me on GitHub
#datascript
<
2016-11-13
>
seantempesta02:11:24

@misha: Wow. Cool. How’d you get that running?

misha02:11:24

@seantempesta 2 different compiled .js files: for main and for db (with basic "fn name + transit-compressed args" api). Basic RN module, which runs db.js in a new jscore. https://facebook.github.io/react-native/docs/native-modules-ios.html

misha02:11:37

As a result you get something like async storage, but with DS instead of hashmap under the hood. In dev mode the overhead is ~50ms though, last time I checked.

seantempesta03:11:26

Very cool. Do you have the RN module code posted anywhere? I’m not very familiar with Objective C or Java, so building even a basic RM module is pretty challenging.

misha05:11:27

Not yet, too ugly

misha05:11:28

And ios only

rauh08:11:52

Idea: Create a similar Entity implementation that uses a cache which can "record" all accesses of keys of the entity. That way, for UIs using mostly Entities, we can wrap the render function and observe which entity keys were accessed during the render. We can then automatically create a re-render trigger based on this. Would be pretty cool for rum+datascript.

Niki11:11:23

Nice idea, yes

Niki11:11:04

You will also need to know which entities you ve used during render

rauh18:11:40

@tonsky Yes, but I think they get mostly passed in as props/args so they that can be checked quickly by filtering.