---
title: "Discussion on \"How to use API in React: Creating Random Robo App with flip card effect\" | Hashnode"
description: "Discussion on \"How to use API in React: Creating Random Robo App with flip card effect\". App.js\nimport React, { useState, useEffect } from \"react\";\nimport \"./RandomRobo.css\";\n\nfunction RandomRobo() {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  //..."
url: "https://hashnode.com/posts/using-api-in-react/62b15e615abe3c6b79d14eac"
---

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

Discussion

# [How to use API in React: Creating Random Robo App with flip card effect](https://swapnilg671.hashnode.dev/using-api-in-react?utm_source=hashnode&utm_medium=feed)

App.js import React, { useState, useEffect } from "react"; import "./RandomRobo.css"; function RandomRobo() { const \[data, setData\] = useState(null); const \[loading, setLoading\] = useState(true); const \[error, setError\] = useState(null); //...

Jun 21, 2022 · 2 min read · swapnilg671.hashnode.dev  
Updated Jun 22, 2022  
Read the article

## Written by

[Swapnil Gupta](https://hashnode.com/@Swapnilxi)

@Swapnilxi

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

A Developer

A cup of coffee and some broken lines of code, that's pretty much it! Portfolio: http://linkedin.com/in/swapnilxi

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
