loading...
Cover image for Learning About APIs and Hooks in React

Learning About APIs and Hooks in React

alexlsalt profile image Alex Morton Updated on ・2 min read

This post was originally published on September 9, 2020 on my blog.

Hey, hey, hey! Today is Podcast Production Wednesday for The Ladies Code Collective Podcast, which means I'll be focusing most of today's attention on launching an episode and recording a future episode - yay!

Yesterday, I started playing around with APIs in React by fetching data from Reddit and displaying it on a test React app. It was awesome!

I essentially made an axios call to the Reddit URL with whatever props I passed it as the subreddit. Just from changing the subreddit prop that was passed into it at the time of rendering the component, I could update what was displayed in the DOM.

I've also been taking more of a deep-dive into the different React methods (i.e. componentDidMount, componentDidUnmount, etc), which has been super interesting because I distinctly remember being extremely confused on why these methods were always used within components, and now it's making more and more sense.

Basically, in my head, I was thinking 'Wait, why does every developer name these methods the same thing?' when in reality, they're just the names of the methods that make up the React framework.

I also started in on learning about Hooks which has always been on my radar but I'd always felt like I wasn't ready for. I studied them a bit yesterday, and I'll focus on them a bit more tomorrow.

Looking forward to using them more in practice!


P.S. Did you know I have a podcast with new episodes each Wednesday? Go listen right over here >>

The Ladies Code Collective Podcast cover art

Discussion

pic
Editor guide