Project #3 Wikipedia Viewer

A still from Wikepedia Viewer

This is my #3 project for FCC Speedrun 2, for my previous project please visit to these posts:

  1. FCC Speedrun — Project #1 Random Quote Machine
  2. FCC Speedrun — Project #2 Local Weather App

During this project, I learnt about how MediaWiki API handles request and the responses. And also to retrieve public wiki pages by using origin=* in the GET url.

I am using the built in onChange() method provided by react to handle the user’s input. There was a time when React failed to loop thorough the Objects and displayed this error:


Uncaught (in promise) Error: Objects are not valid as a React child (found: object with keys )
If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `exports`.(…)

I searched for a solution to this problem, because without the articles my web app was nothing but a static site, which renders only the images and text.

Soon I figured out a solution to convert my response Object (articles) into an Array. Here’s the solution which I found .

Then I converted my articles into an array with some tweaks for proper data structure.

Later I compiled all the data received and my JSX code. Used the create-react-app pre-configured build command to produce a Production ready web app. I have used Surge to deploy my web app.

If you want to see the this project in action, please visit here.

If you want to see the Code for this project, please visit here.

P.S. If you enjoyed this article, it would mean a lot if you click the 💚 and share with friends.