Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Planets facts using React and Typescript

react, typescript
Mokalbari•180
@Mokalbari
A solution to the Planets fact site challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

This was my first project with React and Typescript. I had to rewrite things a lot and cry while watching the error count going wild. BUT. I managed to make to the end.

What i'm proud of:

  • I'm really proud of rewriting the json file into a data.ts file. This way, it was way easier to assure type safety throughout the document.
  • I'm really proud of using the hook useContext to simplify the state management in different part of the app.
  • The responsive part was one hell of a ride.

What I would do differently :

  • Take more time to rewrite the data json. I struggled in the middle while the file was not as good as expected.
  • Use less atomic classes. While easier to read it's harder to maintain while going responsive.
  • Break components further down.
What challenges did you encounter, and how did you overcome them?

I had two main challenges :

  • Type safety. This was my first ever project using Typescript. I was way over my head at first. I took some time to read the doc and I asked a friend to help me figure some things out.

  • Responsive design. This one was really hard for me. Figuring out how things work in react and what to display or not. To overcome this, it was a lot of trial and error.

What specific areas of your project would you like help with?

All feedbacks are welcome but getting some insight on the typescript part and responsivness is much welcomed.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Mokalbari's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License