React, React-Router, vanilla css, typescript REST Countries
Design comparison
Solution retrospective
I made the select from scratch, it is not perfect but it emulate close the real one (I hope so), it just have some details that I would continue working in new projects or continue in this one. I implemented the transitions over the flags between routes. I feel I did good the theme color with the variables css and detect the os preference color.
Edited: I added a Debounce class with typescript and I learned a lot implementing the types using constraints and generics!
What challenges did you encounter, and how did you overcome them?It was interesting to experiment with react-router avoiding to catch the data fetched from the api and when to revalidate it.
What specific areas of your project would you like help with?I got problems with some flags to transition correctly. I think it could be related to the special symbols on the names but I didn't see the difference when I activated the anchor to transition. The file is Card.tsx
Community feedback
- @markuslewinPosted about 2 months ago
Cool, I didn't know React Router had support for view transitions!
I think you need to have
to
match thelocation.pathname
of the target page, so you want to encode the special symbols as well:// const to = `/${official.replace(/\s/g, '%20')}` const to = `/${encodeURIComponent(official)}`;
Marked as helpful0@WlfernandoPosted about 2 months ago@markuslewin thats exactly what I need. Thanks man!
1
Please log in to post a comment
Log in with GitHubJoin 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