back2dos on v1
Add key value iterator to Child… (compare)
dependabot[bot] on npm_and_yarn
Bump cross-fetch from 3.1.4 to … (compare)
dependabot[bot] on npm_and_yarn
Bump async from 2.6.3 to 2.6.4 … (compare)
dependabot[bot] on npm_and_yarn
Bump minimist from 1.2.5 to 1.2… (compare)
back2dos on v1
Slightly better Attribute imple… (compare)
dependabot[bot] on npm_and_yarn
Bump minimist from 1.2.5 to 1.2… (compare)
So, I discovered puppeteer with lix run travix run js
, this seems like what I was dreaming of :).
Now however I am getting ReferenceError: require is not defined
at this line var coconut_react_internal_NativeComponent = require("react").Component;
. Is there anything I can do? (for now, all I see is ask the question and go grab some beers)
-D react_global
)
@:constant var server : { function foo():Promise<String>; }
.()->"Foo"
.tink.web.proxy.Remote<Something>
.Something
has a function foo
, it won't unite (because there seem to be subtleties in the macro), giving this error: tink.web.proxy.Remote1 should be { foo : () -> tink.Promise<String> }
.IncomingResponse
on client side
{foo: () -> remote.foo()}
?
Better I type here than add garbage to MVCoconut/coconut.ui#92. So after updating +tink state (1.0.0-beta.3) and core (2.0.2), the JS fails at the last line with process
:
var wasUpdating = tink_state_Observable.isUpdating;
tink_state_Observable.isUpdating = true;
return tink_core_TypedError.tryFinally(function() {
var hrtime = process.hrtime();
process is not defined
process
is not defined...
class OverviewPage extends View {
@:attr var data1:Promised<Data1>;
@:attr var getData2:()->Promise<Data2>;
@:loaded var data2:Data2 = getData2();
@:attr var getData3:()->Promise<Data3>;
@:attr var data4:Model4;
function render() '
<Widget1 data=${data1} />
<Widget2 data=${data2} />
<Widget3 getData=${getData3} />
<Widget4 data=${data4} />
';
}
class Model4 implements Model {
@:attr var getData:()->Promise<Data4>;
@:loaded var data:Data4 = getData();
}
@:promised var data:Data1
as a shorthand of #1
@:genericBuild class Like<T> {}
that takes an interface/class and returns a structure corresponding to it
@:constant var services:Like<Remote<Api>>
and you can stick in a remote, but during tests just an anonymous object that returns what you want it to
ModalWindow extends View
.App
class, static function modal(modal:ModalWindow) { ... ; Renderer.mount( div, modal); }
.Rendered.mount
has to be RenderedResult
; so what is the recommended way to render a view? (render()
is private, so that's not it right?)
class Team implements coconut.data.Model {
@:editable var color : String;
}
class World implements coconut.data.Model {
@:editable var colors : List<String> = List.fromArray(['red', 'green']);
@:computed var teams : List<Team> = colors.map( k -> new Team({color:k}) );
}
In this example, any time colors
will be edited, I think the objects in teams
will be entirely rebuit. But when each team is complex enough, with @:loaded
and what not, it is not very good. I am trying to find a way for them to persist but keeping @:computed
if possible. Or is there a better approach
@:computed
you can also access the last value as $last
which is an Option
(because on the first computation it is None
) ... it's a little less straightforward, but since the previous value is discarded after the computation, you need not worry about keeping too many stale values around
class V extends View {
@:state var num : Int = 0;
@:attr var setVal : Int->Void = (n:Int) -> num = n;
function render() <>
<input type="number" defaultValue={Std.string(num)} />
<button onclick={setVal(24)} value="24" />
<button onclick={setVal(37)} value="37" />
</>;
}
this renders _0__ [ 24 ] [ 37 ]
, however on the react-dom
backend (only), clicking the buttons 24 and 37 won't change the input. I think this is a problem that can not be fixed for now and instead it has to be worked around, but does anybody understands what's wrong in the first place?