Rest Countries API with theme switcher, React.js

Solution retrospective
Hi everyone, I use localStorage to store and get the search and filter conditions so that they are persisted after I click through to the detail page and then come back. Is there a way to persist the input value while using useRef hook? In the SearchFilter component, I was using useRef to refer to the search bar value, but I found it difficult to initialize the reference value, so I changed to useState hook, which works well. Thanks in advance for any suggestions!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Katherine'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