---
title: "Discussion on \"Ways of Getting Data from API in React\" | Hashnode"
description: "Discussion on \"Ways of Getting Data from API in React\". This blog post is about the ways of getting data from API in React. \nBefore you read this post, you should be familiar with React library and Application Programming Interface (API).\nReact library is a wonderful tool for building reach and highly sca..."
url: "https://hashnode.com/posts/ways-of-getting-data-from-api-in-react/606ad8c9b17dc439b747c8f5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Ways of Getting Data from API in React](https://olena.hashnode.dev/ways-of-getting-data-from-api-in-react?utm_source=hashnode&utm_medium=feed)

This blog post is about the ways of getting data from API in React. Before you read this post, you should be familiar with React library and Application Programming Interface (API). React library is a wonderful tool for building reach and highly sca...

Apr 5, 2021 · 4 min read · olena.hashnode.dev  
Updated Apr 12, 2021  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#apis](https://hashnode.com/tag/apis)

## Written by

[Olena Drugalya](https://hashnode.com/@Olena)

@Olena · Germany

  
[View profile](https://hashnode.com/@Olena)

Web Developer/ Blogger

I am web developer / front-end engineer from Germany. My stack includes: HTML and CSS (including SASS, Tailwind, MaterialUI, Bootstrap) JavaScript ReactJS WordPress Git

## Responses 4

Markdown supported · ⌘↵ to post

[Deepak Rawat](https://hashnode.com/@abcdeepakr)

[Sep 27, 2021](https://hashnode.com/posts/ways-of-getting-data-from-api-in-react/606ad8c9b17dc439b747c8f5/comment/615219a1040ee87236950729)

hey Olena, lovely article anyhow I have a doubt regarding API calls from react, is it secure if I am fetching data with basic auth, is the application secure if I store the API key as env variables? Any sort of help will be appreciated :)

[Salim Moulmaaz](https://hashnode.com/@SalimAPI)

[Apr 26, 2021](https://hashnode.com/posts/ways-of-getting-data-from-api-in-react/606ad8c9b17dc439b747c8f5/comment/6086dbf9e1555b2a98aad4f5)

Great article Olena thank you!

You can check our Saas plateform which facilitate integration of APIS.

We tend to simplify the integration of APIs, the interfaces that allow the exchange between isolated services and data.

meta-api.io

You can reach me if you have questions !

Salim

[Thintinos Gerardo Vodonou](https://hashnode.com/@Thintinos)

[Apr 11, 2021](https://hashnode.com/posts/ways-of-getting-data-from-api-in-react/606ad8c9b17dc439b747c8f5/comment/607380458b2b857c0bdb759f)

Awesome article. Thanks for sharing.

[Adediwura Boluro-Ajayi](https://hashnode.com/@Adediwura)

[Apr 5, 2021](https://hashnode.com/posts/ways-of-getting-data-from-api-in-react/606ad8c9b17dc439b747c8f5/comment/606b17f41ed1783ab0635e93)

Great post. I like how you differentiate between the class based component and function based component in terms of the lifecycle component method and the hook system. I prefer the react-fetch-hook method best, fast and simple. Definitely worthy to be bookmarked.
