startupjs icon indicating copy to clipboard operation
startupjs copied to clipboard

Add Support for URI Model Identifiers (Or any containing .)

Open wip-abramson opened this issue 4 years ago • 1 comments

We are hoping to use StartupJs to interact with JSON-LD objects, where all our ids will be URIs.

We have opened an issue in racer - https://github.com/derbyjs/racer/issues/289 and are working to add support for this.

However, it is likely that some changes will be required in StartupJs. I think in the orm library. Although thoughts on any other changes required would be welcome.

Opening this to explore whether StartupJs would be open to adopting a P.R for these changes

wip-abramson avatar Jul 13 '21 18:07 wip-abramson

@wip-abramson sure, we'll be happy to work with you on merging that change in.

Judging from what Eric said in the original racer issue though it seems that it might break the functionality of reactive functions, refs and the model.on() event listeners. I don't think they are being used much anywhere in the startupjs codebase itself, but we use it in our own end-user projects.

We also plan to add the useStart() hook soon to be able to work with model.start() reactive functions easily, which is basically racer's alternative to computed from MobX. So reactive functions and refs are an important piece of racer's functionality and it would be great if the addition of JSON-LD support won't break the existing racer APIs.

If keeping refs and reactive functions and model.on() support is gonna be tricky though, an alternative solution might be to have the JSON-LD support as a flag which can be turned on in the @startupjs/init by passing an option to init() on server/client.

cray0000 avatar Jul 13 '21 22:07 cray0000