EasyUI Forum
March 28, 2024, 09:40:45 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: React version VS Jquery version  (Read 8428 times)
sectioni
Jr. Member
**
Posts: 67


View Profile
« 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.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 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';
Logged
sectioni
Jr. Member
**
Posts: 67


View Profile
« Reply #2 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...



« Last Edit: December 16, 2018, 05:02:37 AM by sectioni » Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #3 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.
Logged
sectioni
Jr. Member
**
Posts: 67


View Profile
« Reply #4 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?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #5 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
Logged
sectioni
Jr. Member
**
Posts: 67


View Profile
« Reply #6 on: December 23, 2018, 05:14:23 AM »

Oh,
Well, it's not working on Chrome.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #7 on: December 23, 2018, 06:00:36 PM »

Make sure to refresh your page. It works well in chrome,IE,firefox,safari.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!