When I was working through the old version of freeCodeCamp, one of the personal project challenges included building a “Wikipedia Viewer” utilizing Wikipedia’s public API. At the time I used jQuery to create the project.
In the past few months I’ve decided to revisit and rebuild it using React (which I’ve learned since building the original project). It turned into a fun little experimental project to play around with and try new things so I’ve added new features here and there and eventually this is what came out of it:
I appreciate the feedback and have implemented the changes you’ve suggested.
I initially cleared the search input after submission, but then decided not to, thinking that it retains a visual context for the current search - which in hindsight was probably not the best choice.
Didn’t even think about the URLs. You’re right, they’re much more semantically meaningful that way.
Closing the dropdown history list when clicking outside of it was tricky but a very useful thing to try and implement. Had to learn more about using and forwarding refs, clearing event listeners on unmount, etc.