# Is there a simple working React example?

**URL:** <https://forum.flow.com/t/is-there-a-simple-working-react-example/1193>\
**Category:** Flow JavaScript SDK\
**Tags:** flow-sdk-js\
**Created:** [March 5, 2021, 10:15pm UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193 "2021-03-05T22:15:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxVector](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxvector/32/324_2.png) [@MaxVector](https://forum.flow.com/u/MaxVector)\
**Post date:** [March 5, 2021, 10:15pm UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/1 "2021-03-05T22:15:51Z")

</div>

Hi I can’t seem to get any of the React quickstart examples to work. Does anyone have a simple git repo that is working?

This code

```
import React, { useState } from "react";
import * as fcl from "@onflow/fcl";
import { send } from "@onflow/sdk"
import * as sdk from "@onflow/sdk"
import * as types from "@onflow/types"
import {resolveCadence} from "@onflow/sdk-resolve-cadence"
import {args, arg} from "@onflow/sdk-build-arguments"

    const sayHello = async () => {
    const builtInteraction = await sdk.build([
        sdk.script`
    pub fun main(int1: Int, int2: Int): Int {
        return int1 + int2
    }
`,
        args([arg(1, types.Int), arg(2, types.Int)])
    ]);

    const resolvedInteraction = await sdk.pipe(builtInteraction, [
        resolveCadence
    ]);
    console.log(`resolvedInteraction : `, resolvedInteraction);
    // THE ERROR GETS THROWN BELOW
    const response = await sdk.send(resolvedInteraction, { node: "http://localhost:8081" })
    // const decoded = await sdk.decode(response)
};

```

(port 8081 is correct)  
Produces this error:

```
index.js:311 Uncaught (in promise) TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
at fromObject (index.js:311)
at from (index.js:137)
at Function.push../node_modules/buffer/index.js.Buffer.from (index.js:149)
at send-execute-script.js:10

```

I am successfully logged in. When I console log the resolvedInteraction I see this

```
resolvedInteraction :  
{tag: 2, assigns: {…}, status: "OK", reason: null, accounts: {…}, …}
accountAddr: null
accounts: {}
arguments: {f1291c2va2: {…}, hqhtizez0j: {…}}
assigns: {ix.cadence: ƒ}
authorizations: []
block: {isSealed: null, id: null, height: null}
events: {eventType: null, start: null, end: null}
latestBlock: {isSealed: null}
message: {cadence: null, refBlock: null, computLimit: null, proposer: null, payer: null, …}
params: {}
payer: null
proposer: null
reason: null
status: "OK"
tag: 2
transactionId: null
__proto__ : Object
```

---

<div class="post-metadata">

**Author:** ![unlocked](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@unlocked](https://forum.flow.com/u/unlocked)\
**Post date:** [March 5, 2021, 10:27pm UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/2 "2021-03-05T22:27:32Z")

</div>

Have you tried Kitty Items example here [GitHub - onflow/kitty-items: Based on CryptoKitties, Kitty Items is an example of a full-stack dapp built on Flow.](https://github.com/onflow/kitty-items)  
It offers a fullstack example

---

<div class="post-metadata">

**Author:** ![MaxVector](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxvector/32/324_2.png) [@MaxVector](https://forum.flow.com/u/MaxVector)\
**Post date:** [March 5, 2021, 10:32pm UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/3 "2021-03-05T22:32:38Z")

</div>

Ah, cool. I’ll give it a try.

---

<div class="post-metadata">

**Author:** ![Lsy](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/lsy/32/196_2.png) [@Lsy](https://forum.flow.com/u/Lsy)\
**Post date:** [March 6, 2021, 3:30am UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/4 "2021-03-06T03:30:49Z")

</div>

Hello @MaxVector , we are looking forward to building something on Flow to help developers. This is a little bit of experiment we are doing, can you join us, we are very happy to have more developers.

> **[FlowFans/flow-tools](https://github.com/FlowFans/flow-tools)**
>
> Contribute to FlowFans/flow-tools development by creating an account on GitHub.

> **[FlowFans/cadence-deployer](https://github.com/FlowFans/cadence-deployer)**
>
> Cadence 合约部署. Contribute to FlowFans/cadence-deployer development by creating an account on GitHub.

> **[FlowFans/awesome-flow](https://github.com/FlowFans/awesome-flow)**
>
> Contribute to FlowFans/awesome-flow development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![MaxVector](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxvector/32/324_2.png) [@MaxVector](https://forum.flow.com/u/MaxVector)\
**Post date:** [March 6, 2021, 6:09am UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/5 "2021-03-06T06:09:31Z")

</div>

This is awesome! Thanks Lsy, I’ll contribute where I can.

---

<div class="post-metadata">

**Author:** ![MaxVector](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxvector/32/324_2.png) [@MaxVector](https://forum.flow.com/u/MaxVector)\
**Post date:** [March 6, 2021, 8:16am UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/6 "2021-03-06T08:16:51Z")

</div>

flow-tools are incredible! 🤩

---

<div class="post-metadata">

**Author:** ![MaxVector](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maxvector/32/324_2.png) [@MaxVector](https://forum.flow.com/u/MaxVector)\
**Post date:** [March 20, 2021, 1:53pm UTC](https://forum.flow.com/t/is-there-a-simple-working-react-example/1193/7 "2021-03-20T13:53:15Z")

</div>

Ok, this is awesome for Fungible Tokens. Is there an actual working NFT example somewhere (with a github repo)?
