UNPKG
@lyra/vision
Version:
latest (0.3.0)
0.3.0
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.2
0.2.1
0.2.0
React-based data management tool for Lyra projects
vegapublish.com
VegaPublish/vega
@lyra/vision
/
lib
/
util
/
request.js
12 lines
(10 loc)
•
298 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
exports
.
default
=
(
comp, opts, key
) =>
{
return
comp.
context
.
client
.
observable
.
request
(opts).
subscribe
({
next
:
val
=>
comp.
setState
({ [key]: val }),
error
:
_error
=>
comp.
setState
({
error
: _error }) }); };