Join the weekly newsletter: mobirony.ck.page/4a331b9076
@moitp24 ай бұрын
I am not sure to understand why this is not set by default tbh
@dev_bits11 күн бұрын
This kind of tips what the developers need. Thanks.
@StephenMoreira4 ай бұрын
Short and sweet, thanks for the tip.
@andresmauriciofajardoolaya27214 ай бұрын
Thanks for the content Joshua
@dinysanchez4 ай бұрын
Thanks Joshua!
@DorianDauphin4 ай бұрын
Thanks for the content, Joshua. In a previous video, you stated that we should use Signal for synchronous tasks and RxJS when dealing with asynchronous tasks, but this still isn't very clear to me. It would be nice if you could make a video with simple examples showing when it is more appropriate to use signals over RxJS, or vice versa. Have a good day !
@valsimot-pod-dunavom4 ай бұрын
great video, thanks for the info :D
@g-luu4 ай бұрын
Great one thanks
@trevormontgomery67954 ай бұрын
I think this might be my problem in something I'm working on. I was getting what seems like a recursion error when I make an http call. An error must be occurring and angular things I've got a recursive function
@shreyanshjain94794 ай бұрын
That's really cool trick❤
@ianokay4 ай бұрын
Very useful information from the cutting edge, nice video thanks. Unfortunate that it seems you have to spam every toSignal in your application with that object property if you want centralized error handling.
@JoshuaMorony4 ай бұрын
I suppose you could also write a little helper utility if you wanted to have it by default everywhere
@PavelKostenko4 ай бұрын
What code editor are you using, is this nvim inside tmux? Please share your setup
@JoshuaMorony4 ай бұрын
Yes it is - this video is somewhat old but covers most of what I am using: kzbin.info/www/bejne/hma0gZSZr5dgl9E I do have a couple other videos I think that talk about various aspects of my workflow/neovim setup
@anon59924 ай бұрын
how can we utilize @error with this approach?
@richardscholten1002 ай бұрын
Why Is It When Something Happens, It's Always You RxJS? Thanks, exactly the problem i was facing...
@christianhalaby8324 ай бұрын
do you think not using signals at all is a set back?
@svenson954 ай бұрын
I don't really understand what you're doing in 1:50, the as const suffixes. What is happening there? it seems like the status property (a string) gets transformed to a variable / constant. I've never seen this before.
@RodrigoSalesSilva4 ай бұрын
by default if you set a string to any variable the type will be infered as string, but if you use as const the type will be infered as the exact string, like "let a = 'authenticated' as const" the type of "a" will be infered as 'authenticated', otherwise it would be 'string'.
@svenson954 ай бұрын
@@RodrigoSalesSilva okay interesting, but what is the benefit of having this status property not as type string but the actual value? In the next slide (2:01) we're just checking if the status value is "error", if i'm not wrong. Sorry if this is obvious, i feel kind of stupid right now :D
@JoshuaMorony4 ай бұрын
@@svenson95 this stream needs to return status values that match a union type of "initial | authenticating | authenticated | error", if I return just "error" for example it won't let me do that because type "string" is not assignable to that union type. If I use "as const" the specific string "error" does match that type.
@sergiokagiema96584 ай бұрын
Where are the 4 reads that procude 4 triggers ?
@JoshuaMorony4 ай бұрын
I think in the example the signal value is only actually referenced once, but it will depend on how many times change detection is triggered - so even if you only accessed the signal once in the template, but CD ran 4 times, it would cause 4 reads