Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

IP Adress Tracker With React

react, typescript
Lisandra Ferraz•240
@LisandraFerraz
A solution to the IP Address Tracker challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


There is a few points I want to share. In order to get the map updated after doing another search, I did some research and found a way with "useReducer", which I would call inside the function that handles the IP search. With that in mind, I would like to know if there is another (recommended/better) way to get that map updated, since the card component already does it without any dedicated function... (that is also something I found weird, the fact that the component will rerender but the map will not). Also, how I managed to verify which type of prop I should set for the leaflet API url... I did a silly switch case verification transforming the first char of the input value in a number and checking if its type would match. If it sounds confusing, you can check the code to make ir clearer. Anywho, I would love to get suggestions in which way I could go in order to check if the input value is an IP adress or an online domain.

tl;dr: you need to disable any ad blocker or anti-tracker in order to make the solution work :)

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 Lisandra Ferraz'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