Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Fix Graphviz component api #69

Merged
merged 6 commits into from
May 6, 2020
Merged

Fix Graphviz component api #69

merged 6 commits into from
May 6, 2020

Conversation

kamiazya
Copy link
Member

@kamiazya kamiazya commented May 5, 2020

What was a problem

If the Web Module is rendered in ReactDOM at once, an error will be output if there is no context.

Cannot call useGraphvizContext outside GraphvizContext.
Cannot call useGraphvizContext outside context.
Basically, you need to use the render function provided by @ts-graphviz/react.

How this PR fixes the problem

When bundled, the NoContext variable was divided into multiple files and the judgment could not be done normally.

Graphviz component can also be imported from @ts-graphviz/react.

Check lists (check x in [ ] of list items)

  • Test passed
  • Coding style (indentation, etc)

Additional Comments (if any)

Fixed the unnatural part in the error wording.

Cannot call useGraphvizContext outside GraphvizContext.
-Cannot call useGraphvizContext outside context.
Basically, you need to use the render function provided by @ts-graphviz/react.

@kamiazya kamiazya marked this pull request as ready for review May 6, 2020 16:02
@kamiazya kamiazya merged commit da58581 into master May 6, 2020
@kamiazya kamiazya deleted the fix-web-module-api branch May 6, 2020 16:18
@kamiazya kamiazya added the bug Something isn't working label May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant