Cannot use G6 with React
See original GitHub issue- G6 Version:
@antv/g6": "3.4.0", (Have tried @latest too)
- Platform:
OSX 10.15.3
- Mini Showcase(like screenshots):
yarn add @antv/g6
Open file to include
import G6 from "@antv/g6"
yarn start
Whenever I import G6 from "@antv/G6";
and run yarn start
I get the following error.
node_modules/@antv/g6/dist/g6.min.js:24:315787: Unexpected token, expected "," (24:315787)
22 | * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
23 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
> 24 | */(function(){var o="Expected a function",a="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",c="[object Array]",f="[object Boolean]",h="[object Date]",l="[object Error]",d="[object Function]",p="[object GeneratorFunction]",g="[object Map]",v="[object Number]",y="[object ...
25 | //# sourceMappingURL=g6.min.js.map
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
antv/g6 and react. How to update graph? - Stack Overflow
Please note that whenever data is changed, a new G6.Graph will be called. So a new canvas will be created. Try the following...
Read more >Getting Started - G6
Step 2: Import the JS file to the file where G6 is going to be used: ... For more information about it, please...
Read more >Using Your G6 - Amazon S3
WARNING: Failure to use the Dexcom G6 Continuous Glucose Monitoring System (G6) and its components according to the instructions for use and all...
Read more >Use JSX-like syntax to customize G6 nodes
In G6 V3.7.0 and later version, user are allow to use JSX-like syntax to customize ... and others supported by JSON (note that...
Read more >Ant Design Charts | AntV
AntV react component library. ... easy to use. The React component uses charts in a simple configuration that renders elegant, standard charts. advantage....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am using pure react without umi and it works fine. Maybe you should look into that demo.
@jshuadvd remove umi dependencies, add webpack & babel dependencies https://github.com/baizn/g6-in-react