|
Tomek Sułkowski
@
sulco
Warsaw, Poland
|
|
Engineer @StackBlitz⚡️· writes about #JavaScript, #TypeScript, #DevTools and improving Developer Experience
|
|
|
2.043
Tweetovi
|
203
Pratim
|
9.794
Osobe koje vas prate
|
| Tweetovi |
|
Tomek Sułkowski
@sulco
|
31 min |
|
Aaah, great find! 🤔
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
51 min |
|
I honestly don't know. Probably. TypeScript docs are a weird thing to navigate through for me somehow.
Most of the tips I share come just from the day-to-day experience, I try to keep them short and lightweight. When I already know a good resource to link to, I'll usually do it.
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
6 h |
|
|
||
|
Tomek Sułkowski
@sulco
|
6 h |
|
There's also a `Readonly<>` generic for objects :)
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
6 h |
|
Yas! 🔥
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
6 h |
|
I think I know exactly what you mean. I haven't tried a lot of typed languages but they did seem off-putting and, generally, slowing me down.
It took some getting used to TypeScript but not long, and now it's like my coding co-pilot.
I'd seriously love to see you try it.
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
7 h |
|
high virality in this I sense 🤔
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
7 h |
|
#TypeScript tip for today:
`ReadonlyArray` will make an array only permit immutable operations. pic.twitter.com/HSQoZwIkRc
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
31. sij |
|
#React tip for today:
Right-click on a prop (or piece of state, hook, or context value) in React Dev Tools to copy or store it as a global variable. pic.twitter.com/qtvHfjzdMo
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
29. sij |
|
👏 Looks great! Props for spreading the knowledge!
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
29. sij |
|
😅🔥
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
29. sij |
|
Thanks! Yes, I do actually plan to share them in one neat collection (soon:) )
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
29. sij |
|
Thank you! 😊
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
29. sij |
|
#TypeScript tip for today:
`keyof` gets a union type of all properties of the given object – useful for defining params for sorting, filtering, etc. pic.twitter.com/nqlWC5POhx
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
27. sij |
|
😅
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
27. sij |
|
#JavaScript tip for today:
Assign a default value when destructuring – objects and arrays! pic.twitter.com/beyLAo8W0P
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
26. sij |
|
The end effect is the same, but you get there with significantly less typing
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
26. sij |
|
Baby Slings (aka wraps) were so successful in our (seemingly helpless case), my wife became a baby wrap instructor :) Just make sure you wear it well, and it's a godsend. Having both hands free is a bonus.
Btw. a carrier might seem similar but it's quite another story
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
24. sij |
|
[[obligatory "not with TypeScript🤷♂️" response goes here]]
|
||
|
|
||
|
Tomek Sułkowski
@sulco
|
24. sij |
|
Thanks! And I won't mind it at all :)
|
||
|
|
||