I am trying to follow the demos but I am getting an error when trying to import a module. I am strictly coding using .jsx files (not .js!!)
When I try following this example I get an error with the first three import lines:
https://www.jqwidgets.com/react/react-treegrid/react-treegrid-defaultfunctionality.htm
ex:
import JqxTreeGrid from ‘../../../jqwidgets-react/react_jqxtreegrid.js’;
In my browser it is a .js file that was converted from .jsx, but I get a “require” error because the browser can’t interpret this without using Browserify, Require JS etc.
But if I take out those import lines, I can’t use the JqxTreeGrid module in the snippet below
<JqxTreeGrid ref='myTreeGrid'
width={850} source={dataAdapter} pageable={true}
columnsResize={true} columns={columns}
/>
Error when I include import… in the .jsx file:
Uncaught ReferenceError: require is not defined
When I do not include the import… in the .jsx file:
Uncaught ReferenceError: JqxTreeGrid is not defined
Is there a way to use React with jqWidgets using .jsx files without having to install something like Browserify?