Rob McM

9.4K posts

Rob McM

Rob McM

@robmcm

Application developer of all* kinds. (* mainly web related however)

England Beigetreten Nisan 2007
221 Folgt226 Follower
Oleg | webstudio.is
Oleg | webstudio.is@oleg008·
"An engineer is making a flat white at home"
English
2
1
7
2.6K
Rob McM
Rob McM@robmcm·
@BenLesh While it help to separate state then side effects, you can still inadvertently renter. Often run into this subtle gotcha in redux observables github.com/redux-observab…
English
0
0
0
11
Ben Lesh
Ben Lesh@BenLesh·
This isn't unique to RxJS. This could happen in any system where you're pushing a value through a callback or handler. Hand-rolled event emitters, for example. 2/
English
2
0
2
1K
Ben Lesh
Ben Lesh@BenLesh·
Re-entrancy in reactive programming is hard to see. Basically, anywhere you call a callback (or `next()`), you could be re-entering your function. Make sure important side-effects happen first. Here's the `take` operator with and without accounting for re-entrancy 1/
Ben Lesh tweet mediaBen Lesh tweet mediaBen Lesh tweet media
English
2
7
42
11.1K
Rob McM
Rob McM@robmcm·
@samselikoff Yes, changing it to a const fixes this. It’s more confusing when accessing the outer functions parameter values as parameters are let/mutable by default (but subtlety so), and would therefore unfortunately require you to reassign to a const.
English
1
0
1
371
Sam Selikoff
Sam Selikoff@samselikoff·
map not guaranteed to be pure
English
5
0
61
35.4K
Sam Selikoff
Sam Selikoff@samselikoff·
TypeScript wizards: channel is defined on line 9 but possibly undefined on line 12. Any idea why? #code/DYUwLgBAxgFghgOwSYBnCBeCBtAUBAiAbwEsATALggEYAaCAWxFVTgHNmrs6IAmegMwBdAL618hUpT70mLdpxwAWegFZRuIblyhIsRMmCZo8JClQA6AGYkEZABRRMAPmgXymDFmoBKbSSsIR1NDH2IJAigAewRUKNALYCi2YIMUdzI-CJM04As5Vg5LBjgAB3sChRdwwlroGLiEpJT9MzzyP1qRPxFcIA" target="_blank" rel="nofollow noopener">typescriptlang.org/play?#code/DYU…
Sam Selikoff tweet media
English
152
33
557
464K
Rob McM
Rob McM@robmcm·
@andybudd Reminds me of this quote from Jobs “You know who the best managers are? They’re the great individual contributors, who never ever want to be a manager, but decide they have to be a manager because no one else is going to be able to do as good a job as them.”
English
1
2
14
1.4K
Andy Budd
Andy Budd@andybudd·
A lot of people want to become a manager because they want to be in charge and tell others what to do. Often the best managers are the ones who don't want to be in charge, but will step up if it means they can help other people, and make things better in the process.
English
13
18
146
12.8K
Rob McM
Rob McM@robmcm·
@NathanBierema @acemarke What about a turning on/off dev tools for specific URLs? I often get bitbucket in mine which I have no interest in inspecting.
English
0
0
0
0
Rob McM
Rob McM@robmcm·
@acemarke Ah yes I think wrap slice would be what I was looking for originally. However there are some pros/cons to adding to an action to weigh up. (Should be able to add sterilisable “context” as opposed to the logger instance it’s self). Thanks 🙏
English
0
0
0
0
Mark Erikson
Mark Erikson@acemarke·
@robmcm That said, it sounds like you may be attaching a sort of "class instance" or function to the action itself, which strictly speaking isn't something you should be doing in Redux: #do-not-put-non-serializable-values-in-state-or-actions" target="_blank" rel="nofollow noopener">redux.js.org/style-guide/st… it'll run, and you can if you _really_ want to, but it's not "right"
English
1
0
0
0
Rob McM
Rob McM@robmcm·
@acemarke is there a prescribed pattern for passing dependencies to a createSlice reducer? E.g. a logger with runtime defined ID/context?
English
1
0
0
0
Rob McM
Rob McM@robmcm·
@acemarke … I created a middleware to add a logger to the action meta which seems to fit with the state/action pattern. Before RTK we used to “create” a reducer with a logger in the closure, but this isn’t possible with the config approach of creating a slice in toolkit.
English
1
0
0
0
Rob McM
Rob McM@robmcm·
@acemarke In this use case it’s a runtime logger (which uploads to server, adds context etc). It’s technically a side effect, but not in terms of affecting state (exceptions aside I guess).
English
1
0
0
0
Rob McM retweetet
will ye
will ye@will__ye·
shitposting on LinkedIn is such an underrated activity lmaoooo
will ye tweet mediawill ye tweet mediawill ye tweet mediawill ye tweet media
English
521
14.3K
96K
0
Rob McM retweetet
Andy Budd
Andy Budd@andybudd·
Most business books be like... Chapter 1. The authors life story Chapter 2. The actual idea (which could have been a blog post) Chapters 3-12. Carefully chosen anecdata to prove the idea As a short cut, you can usually just read chapter 2 and skip the rest.
English
0
3
22
0
Rob McM retweetet
Krister Johnson
Krister Johnson@KristerJohnson·
Alfredo Rivera is the greatest storyteller of our time.
English
5.4K
91.8K
393K
0
Rob McM
Rob McM@robmcm·
@acdlite It’s been over a year and I’m still woefully inconsistent, I’m not convinced the people on YouTube are actually using milk… youtu.be/oaKRBBpA4fw
YouTube video
YouTube
English
0
0
0
0
Andrew Clark
Andrew Clark@acdlite·
I’m starting to notice a theme… 🤦‍♂️
Andrew Clark tweet media
English
6
0
5
0
Andrew Clark
Andrew Clark@acdlite·
How many attempts does it take before I am no longer terrible at pouring latte art 🙄 This is getting embarrassing.
English
11
1
34
0
Rob McM
Rob McM@robmcm·
@acdlite What did you get? James Hoffman has some great videos on YouTube to help you pass the time until it arrives.
English
0
0
0
0
Andrew Clark
Andrew Clark@acdlite·
Someone please talk me out of it, there's still time to cancel the order
English
9
0
2
0
Andrew Clark
Andrew Clark@acdlite·
Fuck it. I bought an espresso machine.
English
7
0
41
0