Skip to content

Unable to create two instances of react-digraph correctly #219

@javidhsueh

Description

@javidhsueh

Describe the bug
I'd like to show two react-digraph instances on the page, so users can see two graph side-by-side. However, only the first graph shows the graph while the second instance displays empty canvas.

To Reproduce
Steps to reproduce the behavior:

  1. Create two instances of react-digraph and pass the same graph to both of them.
  2. You will see only the first instance displays the graph correctly, the second one is empty.

Expected behavior
See both graphs on the same page.

Screenshots
Screen Shot 2020-05-14 at 10 03 49 AM

https://codesandbox.io/s/react-digraph-di2dv?file=/src/index.js

Desktop (please complete the following information):

  • OS: Mac v10.15.3
  • Browser Chrome
  • Version v81.0.4044.138

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions