You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Old oneconstGateService=()=>{constline=createLine('message');return{
line
}}exportconstinitGate=()=>provide(GateService);exportconstgetGate=()=>provide(GateService).line;// But betterexportconstgateService=service(()=>{constline=createLine('message');return{
line
}})exportconstinitGate=gateService.init;exportconstgetGate=()=>gateService.line;// autoinit if not exists here// And we can use it directlyimport{gateService}from'./gate-service';// ...
Next improvement: add automatic getters for all '$' dollar started properties.
constconnectService=service(()=>{$hasError=box(false);// ...return{
$hasError
}});console.assert(connectService.hasError===false)// its will be greatly helpfullItshouldbenotaproxy->itshouldbeaddedrealgetters.hmmm,thinkaboutmore. ...Iseeperformanceproblemswithproxy
The text was updated successfully, but these errors were encountered:
The "service" method makes a Proxy.
Next improvement: add automatic getters for all '$' dollar started properties.
The text was updated successfully, but these errors were encountered: