# Using ReactFlow in observable

**URL:** <https://talk.observablehq.com/t/using-reactflow-in-observable/7633>\
**Category:** Help\
**Created:** [February 15, 2023, 9:41am UTC](https://talk.observablehq.com/t/using-reactflow-in-observable/7633 "2023-02-15T09:41:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicola](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/nicola/32/1039_2.png) [@nicola](https://talk.observablehq.com/u/nicola)\
**Post date:** [February 15, 2023, 9:41am UTC](https://talk.observablehq.com/t/using-reactflow-in-observable/7633/1 "2023-02-15T09:41:26Z")

</div>

Hello everyone,  
as I was playing with mermaid, I hit its limit really quickly.

I have been using on a project react flow and I really enjoy using it. However, I am having a hard time figuring out how to integrate that in the rest of observable. I wish they had release a non-react version of this.

Did anyone already attempt this?

My main issue is trying to import this:

```auto
reactflow = require("https://unpkg.com/reactflow@11.5.6/dist/umd/index.js")

```

I believe that [React / Jed Fox | Observable](https://observablehq.com/@j-f1/react) will do most of the trick of enabling react into Observable.

Thanks a lot!

> **[Building a Flow - Getting Started - React Flow](https://reactflow.dev/docs/getting-started/building-a-flow/)**
>
> Here's how to install the React Flow package using npm (as reactflow), and how to include it in your own project

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [February 15, 2023, 10:12am UTC](https://talk.observablehq.com/t/using-reactflow-in-observable/7633/2 "2023-02-15T10:12:39Z")

</div>

Try importing via esm.sh:

```javascript
reactflow = import("https://esm.sh/reactflow@11.5.6")

```

and maybe

```javascript
render = reactflow.default.render

```

---

<div class="post-metadata">

**Author:** ![nicola](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/nicola/32/1039_2.png) [@nicola](https://talk.observablehq.com/u/nicola)\
**Post date:** [February 15, 2023, 11:30am UTC](https://talk.observablehq.com/t/using-reactflow-in-observable/7633/3 "2023-02-15T11:30:12Z")

</div>

works!

we should update @mbostock notebook on how to import stubborn modules!

---

<div class="post-metadata">

**Author:** ![nicola](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/nicola/32/1039_2.png) [@nicola](https://talk.observablehq.com/u/nicola)\
**Post date:** [February 17, 2023, 10:07am UTC](https://talk.observablehq.com/t/using-reactflow-in-observable/7633/4 "2023-02-17T10:07:45Z")

</div>

Unfortunately, I get `l.current` is null in `useRef`, I found some previous issues reporting on this for React, but haven’t figured out how to fix that.

Anyway, leaving my debug page here: [ReactFlow on Observablehq / Nicola | Observable](https://observablehq.com/d/4b071c1285a1b7c5)
