Posts

Showing posts from September, 2023

Triangle Walks

Image
Triangle Walks This is one of my favourite songs from one of my favourite albums - Fever Ray by Fever Ray. I love it and it has a magical fairy tale vibe to it. I also like the feeling within it - "Who is that, to come by my house" - of setting a boundary. Rendering a Component's Props Continuing with yesterday's example  Also there's this bit as well...  Passing props From Component to Component "The most common use of props is to pass information to a component from a different component. Props in React travel in a one-way direction, from the top to bottom, parent to child." "Props passed down are immutable, meaning they cannot be changed. If a component wants new values for its props, it needs to rely on the parent component to pass it new ones." handleEvent, onEvent, and props.onEvent "When you pass an event handler as a prop, as you just did, there are two names that you have to choose. Both naming choices occur in the parent compon

Fever Ray

Image
Fever Ray My favourite album of all time is ' Fever Ray' by Fever Ray. I bet you didn't see that coming, huh?             Cows grazing on a hill near my house. Source:  https://www.alltrails.com/en-gb/luxembourg/mersch/lintgen/forest It all started with discovering one song from it in Uni - my friend from Jiu Jitsu was a fan and it wasn't until the pandemic or almost 8 years later that I fully fell in love with the whole album. I used to run around and dance around the my forested area while singing these songs. The album sounds like exactly how the forest feels. Speaking of which I lost my old photos and I can't find photos that capture the forest near my house with the same intimacy my photos did and I think that is because almost no-one loves the forest back near my house like I do. I miss it with all of my heart, so much it hurts. All of my heart is breaking over it. React Components A React component's "job is often to render some HTML and re-render it

Halcyon and on and on, part II

Image
Halcyon and On and On and On and On and On and On and On and On and On I like this song.  It is the ending song to Mean Girls and the song at the beginning of the credits too and maybe even for all of the while credits. Regardless of whether it is for this reason or not, this song always makes me feel like I am having a happy ending. Here is a picture of my newt, lol Default Parameters "If a parameter is assigned a default value, TypeScript will infer the variable type to be the same as the default value's type. (This is similar to how TypeScript infers the type of an initialised variable to be the same as the type of its initial value)." "Parameters with default values don't need a ? after the name, since assigning a default value already implies that they're optional parameters". Inferring Return Types "TypeScript can also infer the types of values returned by functions.  It does this by looking at the types of the values after a function's r