Generates random joke as user clicks on the button.
- practice reactjs
- understand react hooks - useState, useEffect
- understand props
- react basics
- random jokes api
- api
- api related
- how to consume rest api in react
- how to integrate api in react - with & without axios
- how to use js fetch to get data
- understanding react props
- multiple different ways to fetch data from apis in react - promises, async/await, axios with promises, axios with async/await
- 3 ways to make api calls in react - XMLHttpRequest, Fetch API, axios
- header --> title + p
- joke --> displays joke text
- footer --> h3 & h4
- structure the entire project
- create all components
- work on each component in this order, header --> joke --> footer
- style it
- conditional rendering
- no special syntax, works the same way as regular js
- rendering lists
- inside a component, use map to transform an array of something into an array of li items
- and for each item in a list, it needs to have a key attribute
- useState
- learnt how to work with useState
- how to handle events via buttons
- decide on the relevant components and structure it
- i think i need to get a really good grasp on "props", so i'll use this link
- now, i gotta work on understanding responding to/handling events -- this link helped
- found a public REST APIs on the Postman API network this
- really focused on understanding these --> useState, useEffect, fetch