Problem with React-Select

Hi, my profile editing works and i’m using react-select for that but the problem is after i choose the values afterwards when i come to edit the profile again the name of the values are not displayed (but they are successfuly stored into my mongodb), instead they are displayed like an empty string with an X sign just like on the picture?

Here is the whole code:

You posted a tiny bit of your code that doesn’t even work.
Create a working example that shows the bug you have.

I’m working with MERN and that is not possible to achieve on codesandbox.

If you have questions that might lead to problem that aren’t in the .js file I sent please feel free to ask.

The code doesn’t even compile though, it just breaks, so it’s not really possible to test what’s wrong unless you’ve made some obvious syntax error (I’m on a phone so not even possible to see that).

Yes it is, you know what your API looks like so just replace the functions with ones that directly return what you expect the values to be, for example:

const myDb = {}
let id = 0;

function whateverTheFunctionThatSavingDataIsCalled(data) {
  const entry = { id, data };
  myDb[id] = entry;
  return entry;

function whateverTheFunctionForGetEntryIsCalled(id) {
  return myDb[id];

function whateverTheFunctionForGetEntriesIsCalled() {
  return Object.values(myDb);