Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.34 KB

README.md

File metadata and controls

27 lines (16 loc) · 1.34 KB

Full Stack Open - Submissions

My solutions for the Full Stack Open course by the University of Helsinki.

Part 0 - Fundamentals of Web Apps

Part 1

Introduction to React.js

Exercises 1.1 to 1.5: Course Information

A more complex state, debugging React apps

Anecdotes

In this project I've learnt more in React.js in my own so I can make the project more real world, here is what I've done so far beyond the exercises:

  1. I created tempArr state variable that keeps tracking of all generated indexes so we don't see the same anecdote multiple times and then when it's length is equal to anecdotes length, we simply clean it (using useEffect because it tracks it in every change) so we start with a clean tempArr and new random indexes.
  2. I developed MostVotedAnecdote that first checks if votes state variable (array) is all zeros, if yes then return immediately, however, if it has any value that is > 0 then render the header text with that anecdote.