I am building one project based on the MERN stack. I got stuck in a signup form, it has one field of country. So, how could I get the list of countries or guide me any way by which I could achieve this?
You'd either have to have the countries in your backend on an URI you could ask from the frontend (GET /countries/) and display them.
Or have them directly in the frontend in a .json
file and .map()
it to display the options/autocomplete.
Can't help you more without code or more precision though.