Error in fetching data URL scheme "mongodb+srv" is not supported

I tried using basic fetch and connecting my react app with MongoDB but it is throwing error. I tried all of possible tutorial but I can’t fix this please help.

here is my code snipper

const response = await fetch(`mongodb+srv://uname:pass@cluster0.v6btaez.mongodb.net/db_sample?retryWrites=true&w=majority`);
      if (!response.ok) {
        const message = `An error occurred: ${response.statusText}`
        window.alert(message)
        return;
      } 

Hi @nut_craker and welcome to MongoDB community forums!!

In order to assist you further, could you help us with few information regarding the error that you are facing:

  1. What is the error you are facing while making the connection?
  2. What are the documentations you are following ?
  3. Is the connection working with other drivers or in mongoshell or compass?
    The following documents on How to connect the React App with MongoDB would be a good starting point for the development.

Regards
Aasawari