Zoid Usage in React: Error: Driver support not enabled
See original GitHub issueIssue
Hi, been trying to learn how Zoid work with a React app. However, I am struggling to get the React web app to work with Zoid because it throws Driver support not enabled
error at runtime.
The debugging attempt shows that the _proto
is undefined on line 3316 in zoid.js
, I am really not sure what’s missing in the current setup in React App and couldn’t find any relevant documentation or issue about it.
Any guidance for how to get around this issue would be very much appreciated.
Code
Here are the code that reproduce the issue:
In React app
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import zoid from 'zoid';
export let ZoidComponent = zoid.create({
tag: 'zoid-component',
url: 'http://localhost:8080/Index.html'
});
let ReactComponent = ZoidComponent.driver('react', {
React: React,
ReactDOM: ReactDOM
});
class App extends Component {
constructor(props) {
super(props);
this.state = {
hasError: false
};
}
componentDidCatch(error, info) {
this.setState({ hasError: true, error });
}
render() {
return this.state.hasError ? (
<div>Error occurred when rendering React App</div>
) : (
<ReactComponent loadComponent={'load Component'}/>
);
}
}
export default App;
Dependencies
Here are the references of the dependencies:
"dependencies": {
"react": "16.8.6",
"react-dom": "16.8.6",
"redux": "4.0.1",
"zoid": "9.0.24"
},
"devDependencies": {
"@babel/core": "7.4.4",
"@babel/preset-env": "7.4.4",
"@babel/preset-react": "7.0.0",
"babel-loader": "8.0.5",
"webpack": "4.30.0",
"webpack-cli": "3.3.2",
}
Tried older version of React and React-dom as follow and doesn’t work either and throws the same error
"react": "16.2.0",
"react-dom": "16.2.1",
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Introducing zoid — cross-domain, React-like components ...
Here I'm rendering a cross-domain, iframe based component with zoid. ... major frameworks, then everyone can use them no matter what stack they're...
Read more >krakenjs
At our startup, we are trying to use ZOID for reliably embedding applications on the websites of clients. So far everything seems fine,...
Read more >Cross-Domain React Apps with Zoid and Create ... - YouTube
Sorry the volume is loud and the camera is obscuring the code ^_^ I'm learning how to create better videos.Full Tutorial available at...
Read more >zoid
Cross domain components.. Latest version: 9.0.86, last published: a year ago. Start using zoid in your project by running `npm i zoid`.
Read more >zoid.min.js.map
The CDN for zoid. ... zoid/dist/zoid.min.js.map ... Error(`Popups not supported in this build -- please use the full zoid.js build`);\n }\n\n let anyEnabled ......
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
import * as zoid from 'zoid/dist/zoid.frameworks.js';
solves that problem.Did you start using
dist/zoid.frameworks.js
?