This is a solution to the IP address tracker challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for each page depending on their device's screen size
- See hover states for all interactive elements on the page
- See their own IP address on the map on the initial page load
- Search for any IP addresses or domains and see the key information and location
- Live Site URL: live site
- Semantic HTML5 markup
- SCSS
- Flexbox
- Desktop-first workflow
- React - JS library
- React Leaflet
- Free IP API
I learnt to work with useEffect()
hook and how to fetch data using it. Object destructuring of useState()
was also used in some places like here :
const [error, seterror] = useState({ errorMsg: "hide", border: "" });
I'll continue working with useEffect()
hook and learn other hooks as well like useRef()
and useMemo()
. . .maybe work with Leaflet as well in the future...I'll try to work on JS Regex as well , since this time as well I copied the regex for valid IP Address from the net as well 😅😅
- Free IP API - This helped me as it provided with 60 requests per minute. Other APIs on the other hand provided with 1000 reqs per month . . .which I would have exhausted while building the project, the API data may/may not be a bit compromised as it is open sourced , but it's fine ig . . .
- React Leaflet - This is an amazing documentataion which helped me work with leaflet library and implement the map the way I wanted to. I'd recommend it to anyone still learning this concept.
- Frontend Mentor - @solitary_coder
- GPT and Youtube ofc