Open VRspace4 opened 6 years ago
Essential JS1 for React provided support for React v16.0+ from Volume 4, 2017. Find the updated getting started UG to add “create-react-class” package in application. https://help.syncfusion.com/reactjs/overview https://help.syncfusion.com/reactjs/release-notes/v15.4.0.17?type=all
To overcome the issue, you can refer the "create-react-class" script. Because changing the function call in ej.web.react.min.js
will cause rendering issue with React v16.0+.
For any who needs to know. The way to use this package with create-react-app is to do the following:
import React, { Component } from 'react';
import ReactDOM from "react-dom";
import createClass from "create-react-class";
import jquery from "jquery";
window.jQuery = jquery;
window.$ = jquery;
window.React = React;
window.ReactDOM = ReactDOM;
window.createReactClass = createClass;
require("jsrender");
require("syncfusion-javascript/Scripts/ej/web/ej.spreadsheet.min.js");
require("syncfusion-javascript/Scripts/ej/common/ej.web.react.min.js");
require("syncfusion-javascript/Content/ej/web/material/ej.web.all.min.css");
const EJ = window.EJ;
const ej = window.ej;
Having that it's possible to use the components as in the documentation
"syncfusion-javascript": "^15.4.17"
From the
ej.web.react.min.js
file located insyncfusion-javascript/Scripts/ej/common/
, please change fromcreateReactClass
toReact.createClass
. Otherwise it'll prompt the following error: