Latest solutions
- Submitted about 1 year ago
Social links Profile built with tailwindcss
#tailwind-css#accessibility- HTML
- CSS
- Submitted about 1 year ago
Article Preview Component Built with plain web and tailwindcss
#tailwind-css#accessibility- HTML
- CSS
- JS
- Submitted over 1 year ago
Ecommerce Product Page built with React.JS
#framer-motion#react#tailwind-css#typescript#redux-toolkit- HTML
- CSS
- JS
- Submitted over 1 year ago
Clipboard landing page built with React.js
#accessibility#react#react-router#tailwind-css#typescript- HTML
- CSS
Latest comments
- @IgnatiusVisnuSubmitted over 1 year ago@NikaBotchorishviliPosted over 1 year ago
Good job,
I would suggest to not use percentage value for width here and instead of that use fixed width, which you'll modify with media queries when you notice it isn't looking right.
Take care!👋
0 - @mahdipratamaSubmitted almost 2 years ago@NikaBotchorishviliPosted almost 2 years ago
Hello @mahdipratama 👋
Looking over your code I noticed that you use your search term in the function from which you return all your countries.
... const [searchTerm, setSearchTerm] = useState('a'); const fetchAllCountry = useCallback(async () => { setLoading(true); try { const response = await fetch(`${searchCountryURL}${searchTerm}`); ...
You should split the logic for when the user is searching for a country and when all the countries are loaded.
Use this API ENDPOINT to request all of the countries.
Also in the part where you create search term state:
... const [searchTerm, setSearchTerm] = useState('a'); ...
You set the default value to be 'a' which will return many of the countries as a data but not all of them. (You can compare the return data of /all and /name/a)
So to say it shorter split the searching and the initial API requests.
In conclusion the project looks really polished.❤️ Good job and keep going ! 🔥
0