It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.
Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.
#todayilearned
Summarize a concept that is new to you.
And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿
What was your win this week?
Gracie Gregory (she/her) for The DEV Team ・ Apr 9 '21
#discuss
#weeklyretro
Latest comments (30)
this week, i learnt 3 new courses :
1) Express REST API
2) Introduction into micro-services
3) mind mapping techniques for better learning.
This week I learned about React Hook, more about reference and reference forwarding in React.
Nice!
I learned something yesterday which for me was a pretty "weird" discovery:
If you use CSS Flex and you want to (for example) right-align one particular item (while leaving the rest "default"), then guess what you can use ... "margin-left: auto"!
Pretty surprising, to me at least. More info here:
dev.to/samanthaming/flexbox-aligni...
Well so that wasn't what I expected really, I was looking for something like "align-self" or "justify-self" or whatever ...
Speaking of which - I can never remember which is which ("align-items" or "justify-content"), and I finally came across a way to somewhat easily remember which is which:
css-tricks.com/a-quick-way-to-reme...
I learned that ruby ships with a .gdbinit file in the source repo, that permits inspecting the class/objects in the internals, basically handling the unpacking of the tagged ids for you, and saving the results as history items.
Of course I learned that after searching a few locations for "how to debug ruby" and finding a mix of snippets, most attributing a blog that's been offline for a year or two as the source, and a lot of two paragraph "here's how to start gdb" tutorials.
Kind of handy to have the tooling to debug the vm ship with the language sources!
Today I started using Snowpack. I'm seeing really fast build times for React applications with it - even on a creaky old laptop adding a new Tailwind class is basically instantaneous.
I've been trying to learn some zig
I learn about using graph theory to solve problems!
dev.to/kirkcodes/solving-the-domin...
I learned state management in React, useState to be specific.
Same here, It was interesting to learn that, and now the state is available on functional component too. I found it quite easy handling with a hook rather than in-state in-class component. I haven't done much but I hope I am not wrong.
Me too, so far I find it easier to use hooks rather than in-state in class components.
I used the !! operator for the first time. I used it in a ternary and it looks something like this:
const myValue = !!thing.val ? thing.val : '';Boolean magic!