Fetch & Promise — The What, Why & How

  • The option method parameter, for example, would include the type of request we are making such as GET, POST etc.
  • The .then method returns a Promise and allows us to get a response and handle data as we wish.
  • a pending state (the operation has neither been fulfilled nor rejected)
  • a rejected state (the operation failed)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Milan Parmar

Milan Parmar

80 Followers

Software Engineer 👨🏽‍💻 | Full Stack Web Development 💻 | Smartphone Tech Enthusiast📱