My solutions for the Full Stack Open course by the University of Helsinki.
- Exercise 0.4: New note diagram
- Exercise 0.5: Single page app diagram
- Exercise 0.6: New note in Single page app diagram
Exercises 1.1 to 1.5: Course Information
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:
- I created
tempArrstate 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 (usinguseEffectbecause it tracks it in every change) so we start with a clean tempArr and new random indexes. - I developed
MostVotedAnecdotethat first checks ifvotesstate 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.