EasyUI Forum

General Category => EasyUI for React => Topic started by: sectioni on December 13, 2018, 01:39:49 AM



Title: React version VS Jquery version
Post by: sectioni on December 13, 2018, 01:39:49 AM
Hello,

We are currently using the Jquery version and are rebuilding our entire UI with React.

Is there a document somewhere about the features that exist in the Jquery version that are not available now in the React version?

Also, are the is the css class names of the React version the same as the jQuery version?
Or would we need to redo our css rules when we switch?

Thanks.


Title: Re: React version VS Jquery version
Post by: jarry on December 13, 2018, 08:14:43 AM
Most of the features in jQuery edition are same as in React edition. Please look at this documentation https://www.jeasyui.com/documentation5/index.php

The React edition and jQuery edition shares the same theme files. When using the React edition, the 'react.css' file should be included after the 'easyui.css'.
Code:
@import '~rc-easyui/dist/themes/default/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';


Title: Re: React version VS Jquery version
Post by: sectioni on December 16, 2018, 04:55:21 AM
I'm asking because i've looked at the documentation and i'm seeing many differences.

For example, with datagrid.
The jQuery version has an "onLoadSuccess", "onLoadError", "onBeforeLoad" events..
The React version doesn't seem to have that.

And I can count many differences like that.
We need to know what functionality we would loose the moment we switch...





Title: Re: React version VS Jquery version
Post by: jarry on December 16, 2018, 08:16:17 PM
The data loading methods are built with jQuery.ajax and are integrated into the jQuery edition, so the onLoadSuccess,onLoadError,onBeforeLoad events are available.

When using react, you are building a data-driven application. All you need to do is to provide the data, you don't need to worry about the DOM operations. The EasyUI for React has no data operation methods because these are not needed. You can use fetch or axios to load your data from server.

Please look at these example https://www.jeasyui.com/demo-react/main/index.php?plugin=DataGrid&theme=material-teal&dir=ltr&pitem=&sort=asc. All the crud operations are made by modifying the data in the state.


Title: Re: React version VS Jquery version
Post by: sectioni on December 19, 2018, 04:55:20 AM
I see.
Thanks for the explanation.

Is there any plan to make the datagrid column reordering plugin (Column extension) available for the React version?


Title: Re: React version VS Jquery version
Post by: jarry on December 21, 2018, 12:58:25 AM
This feature is available. Please look at this example https://www.jeasyui.com/demo-react/main/index.php?plugin=DataGrid&theme=material-teal&dir=ltr&pitem=Column%20Moving&sort=asc


Title: Re: React version VS Jquery version
Post by: sectioni on December 23, 2018, 05:14:23 AM
Oh,
Well, it's not working on Chrome.


Title: Re: React version VS Jquery version
Post by: jarry on December 23, 2018, 06:00:36 PM
Make sure to refresh your page. It works well in chrome,IE,firefox,safari.