SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Adding Powerful Ext JS Components
to React Apps
Sandeep Adwankar
Sr. Product Manager
Ext JS
2
Ext JS
Components
Ext JS Framework
Components
3
Tree Grid Calendar
Framework
4
Component
Component
Component
MVC
React: A Component Framework w/o Components
5
Ext JS
Components
Ext JS Framework
Ext JS
Components
React.js
Using Ext JS Components in a React World
• React
• Ext JS Framework Ext JS Reactor
• Ext JS Components
• Webpack with Sencha Cmd
• Babel
• Whatever else the developer wants to add
6
The React with Ext JS
7
React
• Renders your application
• Manages user interaction
• Maintains application state
• Coordinates communication
between components
Webpack
• Builds and optimizes all of
your front-end code: JS, CSS,
Images, etc…
Babel
• Use tomorrow’s JavaScript
today
• JSX
• TypeScript is an alternative
Ext JS Components
Ext JS Reactor
• Bridge for Ext JS
Components
Sencha Tools
• Sencha Cmd
• Themer
• Plugin, Stencils, Fiddle etc.
Getting Started
8
• Node 7
• Ext JS 6.2+
• Sencha Cmd 6.2+
• Copy a boilerplate from the extjs-reactor repo, packages dir
• npm install
• npm start
• Open in web browser (for example, http://localhost:8080)
@extjs/reactor
9
https://github.com/sencha/extjs-reactor
Hacker News Demo
10
React Primer
• A JavaScript library for building user interfaces
• React is just the V in MVC
• Solve one problem: Build large applications with data that changes over time.
• React Ecosystem
- react-redux
- react-router
- react-motion
- jest
11
React Components
12
Component
data
HTML
React Components as Pure Functions
13
data
HTMLFunction
Hello World
import React, { Component } from 'react';
export default class HelloWorld extends Component {
render() {
return <div>Hello World</div>
}
}
14
React.createElement('div', {}, 'Hello World');
HTML Can Only Take You so Far
15
import React, { Component } from 'react';
export default class HelloWorld extends Component {
render() {
return <button>Say Hello</button>
}
}
HTML Can Only Take You so Far
16
import React, { Component } from 'react';
export default class HelloWorld extends Component {
render() {
return <button>Say Hello</button>
}
}
HTML Can Only Take You so Far
17
import React, { Component } from 'react';
export default class HelloWorld extends Component {
render() {
return ???
}
}
The World Wide Web of React Components
18
npm install –save react-split-button
19
HTML Can Only Take You so Far
20
import React, { Component } from 'react';
import SplitButton from 'react-split-button';
export default class HelloWorld extends Component {
render() {
return (
<SplitButton
items: [{ label: 'Say Goodbye' }]
>
Say Hello
</SplitButton>
)
}
}
More Components…
21
Juggling Dependencies
"dependencies": {
"react-split-button": "^1.0.0",
"react-datagrid": "^0.5.4",
"react-tree": "^0.1.2",
"react-flexbox": "^2.1.0",
"react-calendar": "^1.1.0",
"react-tabs": "^2.3.4",
"react-layouts": "^1.0.1"
...
}
22
And Then One Day…
react: 15 => 16
23
Oh Boy…
"dependencies": {
"react-split-button": "^1.0.0",
"react-datagrid": "^0.5.4",
"react-tree": "^0.1.2",
"react-flexbox": "^2.1.0",
"react-calendar": "^1.1.0",
"react-tabs": "^2.3.4",
"react-layouts": "^1.0.1"
...
}
24
More Components from a Single Library
"dependencies": {
"@extjs/reactor": "^0.2.5”
}
25
http://examples.sencha.com/extjs/6.2.0/examples/kitchensink
28
Ext JS React Kitchen Sink
29
Implementing SplitButton with Ext JS
30
import React, { Component } from 'react';
import SplitButton from 'react-split-button';
export default class HelloWorld extends Component {
render() {
return (
<SplitButton
items: [{ label: 'Say Goodbye' }]
>
Say Hello
</SplitButton>
)
}
}
Implementing SplitButton with Ext JS
31
import React, { Component } from 'react';
import { SplitButton } from '@extjs/reactor';
export default class HelloWorld extends Component {
render() {
return (
<SplitButton
text: 'Say Hello',
items: [{ label: 'Say Goodbye' }]
/>
)
}
}
Importing Components from Ext JS Reactor
import { Grid } from '@extjs/reactor/modern';
32
xtype: grid
API Docs
33
API Docs
34
Configs => Props
import React from 'react';
import { TabPanel, Panel } from '@extjs/reactor/modern';
function App() {
return (
<TabPanel>
<Panel title="Tab 1">
Tab 1 body
</Panel>
<Panel title="Tab 2">
Tab 2 body
</Panel>
</TabPanel>
)
}
35
Events
import React from 'react';
import { TabPanel, Panel } from '@extjs/reactor';
function App() {
return (
<TabPanel>
<Panel title="Tab 1">
Tab 1 body
</Panel>
<Panel title="Tab 2" onShow={() => alert('Tab 2')}>
Tab 2 body
</Panel>
</TabPanel>
)
}
36
Items => Children
<Toolbar>
<Button text="Import"/>
<Button text="Export"/>
</Toolbar>
37
Docking
<Panel title="Docking">
<Toolbar dock="top">
<Button text="Button in Header"/>
</Toolbar>
<Button text="Button in Body"/>
<Toolbar dock="bottom">
<Button text="Button in Footer"/>
</Toolbar>
</Panel>
38
Layouts
<Panel frame={true} layout="border">
<Panel
region="west"
title="Sidebar"
split={true}
collapsible={true}
>
Sidebar content
</Panel>
<Panel region="center">
Main content
</Panel>
</Panel>
39
Ext JS Components are Themable
Each can be extended using SASS or Sencha Themer
40
Triton Material iOS
Sencha Themer
41
FAQ
Controllers
ViewModels
42
• How much of the Ext JS framework will I use?
Flux (redux, et al...)
Components
Stores
Models
Grid, Tree, Calendar, etc…
43
Components Virtual DOM DOMExt JS?
Ext JS
FAQ
• Does extjs-reactor use the Virtual DOM?
FAQ
44
• Can I use pure Ext JS with extjs-reactor / reuse components from pure Ext JS apps?
import { Panel } from '@extjs/reactor/modern';
import { reactify } from '@extjs/reactor';
const Panel = reactify('panel');
FAQ
45
• Can I use pure Ext JS with extjs-reactor / reuse components from pure Ext JS apps?
import { reactify } from '@extjs/reactor';
const MyCustomComponent = reactify(MyPackage.MyCustomComponent);
...
render() {
return <MyCustomComponent ... />
}
Ext JS and React: Getting Set Up
46
GitHub: sencha/extjs-reactor
packages/reactor-boilerplate
47
Existing React Projects
Download and unzip Ext JS from sencha.com
Download and install Sencha Cmd from sencha.com
npm install --save @extjs/reactor @extjs/reactor-webpack-plugin @extjs/reactor-babel-plugin
unional/reactor-webpack-ts-plugin
48
Webpack
import ExtJSReactorWebpackPlugin from '@extjs/reactor-webpack-plugin’
...
plugins: [
new ExtJSReactorWebpackPlugin({
sdk: '/path/to/extjs',
theme: 'theme-material',
toolkit: 'modern'
packages: ['charts']
}),
]
49
Babel
.babelrc
{
"plugins": [
"@extjs/reactor-babel-plugin"
]
}
50
React App Launch
import ReactDOM from 'react-dom';
import App from './App'; // app components
import { install } from '@extjs/reactor';
install({
// optional, set to true if Ext is laying out the app full screen
viewport: true
});
// launch the react app once Ext JS is ready
Ext.onReady(() => ReactDOM.render(<App/>, document.getElementById('root')));
51
Live Demos
52
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
 
React JS
React JSReact JS
React JS
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
 
React Class Components vs Functional Components: Which is Better?
React Class Components vs Functional Components: Which is Better?React Class Components vs Functional Components: Which is Better?
React Class Components vs Functional Components: Which is Better?
 
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
 
Intro To Docker
Intro To DockerIntro To Docker
Intro To Docker
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjs
 
React & Redux
React & ReduxReact & Redux
React & Redux
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
Asynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesAsynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & Promises
 
Anjular js
Anjular jsAnjular js
Anjular js
 
React hooks
React hooksReact hooks
React hooks
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
React Hooks
React HooksReact Hooks
React Hooks
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
 
React hooks Episode #1: An introduction.
React hooks Episode #1: An introduction.React hooks Episode #1: An introduction.
React hooks Episode #1: An introduction.
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 

Ähnlich wie Adding powerful ext js components to react apps

Ähnlich wie Adding powerful ext js components to react apps (20)

React outbox
React outboxReact outbox
React outbox
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and Symfony
 
React js
React jsReact js
React js
 
SenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark Brocato
SenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark BrocatoSenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark Brocato
SenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark Brocato
 
How to implement multiple layouts using React router V4.pptx
How to implement multiple layouts using React router V4.pptxHow to implement multiple layouts using React router V4.pptx
How to implement multiple layouts using React router V4.pptx
 
Enhance react app with patterns - part 1: higher order component
Enhance react app with patterns - part 1: higher order componentEnhance react app with patterns - part 1: higher order component
Enhance react app with patterns - part 1: higher order component
 
Universal JS Web Applications with React - Web Summer Camp 2017, Rovinj (Work...
Universal JS Web Applications with React - Web Summer Camp 2017, Rovinj (Work...Universal JS Web Applications with React - Web Summer Camp 2017, Rovinj (Work...
Universal JS Web Applications with React - Web Summer Camp 2017, Rovinj (Work...
 
Integrating React.js with PHP projects
Integrating React.js with PHP projectsIntegrating React.js with PHP projects
Integrating React.js with PHP projects
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
 
Getting Started with React v16
Getting Started with React v16Getting Started with React v16
Getting Started with React v16
 
reactjs-quiz..docs.pdf
reactjs-quiz..docs.pdfreactjs-quiz..docs.pdf
reactjs-quiz..docs.pdf
 
Battle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsBattle of React State Managers in frontend applications
Battle of React State Managers in frontend applications
 
Building Universal Web Apps with React ForwardJS 2017
Building Universal Web Apps with React ForwardJS 2017Building Universal Web Apps with React ForwardJS 2017
Building Universal Web Apps with React ForwardJS 2017
 
3 Simple Steps to follow to Create React JS Components
3 Simple Steps to follow to Create React JS Components3 Simple Steps to follow to Create React JS Components
3 Simple Steps to follow to Create React JS Components
 
How to create components in react js
How to create components in react jsHow to create components in react js
How to create components in react js
 
Lessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeLessons from a year of building apps with React Native
Lessons from a year of building apps with React Native
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
 
React: JSX and Top Level API
React: JSX and Top Level APIReact: JSX and Top Level API
React: JSX and Top Level API
 
React & Redux for noobs
React & Redux for noobsReact & Redux for noobs
React & Redux for noobs
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 

Mehr von Sandeep Adwankar

Mehr von Sandeep Adwankar (20)

Building Products with Data at Core
Building Products with Data at Core Building Products with Data at Core
Building Products with Data at Core
 
PWA - ADT Magazine Webinar
PWA - ADT Magazine WebinarPWA - ADT Magazine Webinar
PWA - ADT Magazine Webinar
 
Sencha Products - Coderage Conference
Sencha Products - Coderage ConferenceSencha Products - Coderage Conference
Sencha Products - Coderage Conference
 
Sencha Tooling - Senchacon Conference
Sencha Tooling  - Senchacon ConferenceSencha Tooling  - Senchacon Conference
Sencha Tooling - Senchacon Conference
 
Sencha Tooling Presentation at Senchacon Conference
Sencha Tooling Presentation at Senchacon ConferenceSencha Tooling Presentation at Senchacon Conference
Sencha Tooling Presentation at Senchacon Conference
 
Accelerating web application development
Accelerating web application development Accelerating web application development
Accelerating web application development
 
Building ext js apps with ES2015 using sencha visual studio code plugin
Building ext js apps with ES2015 using sencha visual studio code pluginBuilding ext js apps with ES2015 using sencha visual studio code plugin
Building ext js apps with ES2015 using sencha visual studio code plugin
 
Build great looking web app themes with themer 1.1
Build great looking web app themes with themer 1.1Build great looking web app themes with themer 1.1
Build great looking web app themes with themer 1.1
 
Create winning themes for your ext js apps
Create winning themes for your ext js appsCreate winning themes for your ext js apps
Create winning themes for your ext js apps
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and Framework
 
Sencha Themer 1.2 and Architect 4.2
Sencha Themer 1.2 and Architect 4.2Sencha Themer 1.2 and Architect 4.2
Sencha Themer 1.2 and Architect 4.2
 
Ext JS 6.5 Launch Webinar
Ext JS 6.5 Launch WebinarExt JS 6.5 Launch Webinar
Ext JS 6.5 Launch Webinar
 
Froala - Code Rage Webinar
Froala - Code Rage WebinarFroala - Code Rage Webinar
Froala - Code Rage Webinar
 
Extreact 6.6 Launch
Extreact 6.6 LaunchExtreact 6.6 Launch
Extreact 6.6 Launch
 
Ext JS 6.6 Launch Webinar
Ext JS 6.6 Launch WebinarExt JS 6.6 Launch Webinar
Ext JS 6.6 Launch Webinar
 
Application Development Trends Webinar
Application Development Trends WebinarApplication Development Trends Webinar
Application Development Trends Webinar
 
Ext JS Upgrade Adviser EA Launch
Ext JS Upgrade Adviser EA LaunchExt JS Upgrade Adviser EA Launch
Ext JS Upgrade Adviser EA Launch
 
Ext Web Components - Dev Week 2019
Ext Web Components - Dev Week 2019Ext Web Components - Dev Week 2019
Ext Web Components - Dev Week 2019
 
Ext JS 6.7 Launch Webinar
Ext JS 6.7 Launch WebinarExt JS 6.7 Launch Webinar
Ext JS 6.7 Launch Webinar
 
Ext angular Launch webinar
Ext angular Launch webinarExt angular Launch webinar
Ext angular Launch webinar
 

Kürzlich hochgeladen

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Kürzlich hochgeladen (20)

CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityAPVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 

Adding powerful ext js components to react apps

Hinweis der Redaktion

  1. Take a look what’s new in Sencha Tools, and what’s on the on the horizon for Tools. We will demonstrate the innovations in Sencha Cmd, Architect, Themer, and our new plugin for Visual Studio Code. We will also discuss the Ext Electron Package for native desktop packaging, and what we have planned for adopting the modern and open web tooling based on NodeJS, NPM and Webpack.