Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
React Front-end For Your Drupal 8 Back-end
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Bassam Ismail
October 04, 2016
Technology
2
670
React Front-end For Your Drupal 8 Back-end
Bassam Ismail
October 04, 2016
Tweet
Share
More Decks by Bassam Ismail
See All by Bassam Ismail
CSS Architecture with OOCSS, SMACSS, and BEM
skippednote
3
180
Other Decks in Technology
See All in Technology
20260311 ビジネスSWG活動報告(デジタルアイデンティティ人材育成推進WG Ph2 活動報告会)
oidfj
0
330
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
210
Google系サービスで文字起こしから勝手にカレンダーを埋めるエージェントを作った話
risatube
0
190
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
460
AI実装による「レビューボトルネック」を解消する仕様駆動開発(SDD)/ ai-sdd-review-bottleneck
rakus_dev
0
140
JAWS Days 2026 楽しく学ぼう! 認証認可 入門/20260307-jaws-days-novice-lane-auth
opelab
11
2.3k
銀行の内製開発にて2つのプロダクトを1つのチームでスクラムしてみてる話
koba1210
1
130
(Test) ai-meetup slide creation
oikon48
3
400
Scrumは歪む — 組織設計の原理原則
dashi
0
180
The_Evolution_of_Bits_AI_SRE.pdf
nulabinc
PRO
0
220
Cortex Code CLI と一緒に進めるAgentic Data Engineering
__allllllllez__
0
330
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
52k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
110
My Coaching Mixtape
mlcsv
0
73
Docker and Python
trallard
47
3.8k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Rails Girls Zürich Keynote
gr2m
96
14k
Transcript
React Front-end for You Drupal 8 Back-end Bassam Ismail &
Aliya Khan Front-end | Intermediate
None
MArkETING 101
None
None
None
DUBLIN
None
“How to build a Headless Drupal WeBsite”
@skippednote bassam.co
@ALIYA_KHAN
None
✋
AGENDA • Exposing Drupal • React: Building Composable UIs •
Redux: Unidirectional Data Flow • React with Drupal
Exposing Drupal
None
None
None
None
None
None
Library ≄ Framework
None
UI Logic Markup Styling
None
None
Session List
Session
Session Fields
None
Destructured Props props = { title: “React & Drupal”, speaker:
“Bassam”, experience: “Intermediate” } React Components Pure Component
⨐(state) = UI React Component UI is function of the
Application state
Lifecycle Methods Event Handlers State and bindings No Mutations (Vdom)
MVC Controller View Model
Controlle View Model Controlle View Model Controlle View Model Controlle
View Model Controlle View Model Controlle View Model Controlle View Model Controlle View Model Controlle View Model
None
n items On Delete
“Redux is a predictable state container for JavaScript apps”
Components Application State
State Tree
• Actions and Action Creators • Reducer • Store
Increment DECREMENT Current Value
Action Action Creator
Action Creator Action OBJECT
Reducer
Action No Mutations
⨐(action, state) => newstate { type: “INCREMENT” } 1 0
Store
Create a store Get current state Dispatch Actions
React & Redux
Wrapper Component Provider with Store Root Component
None
connect Function Store State To Component Props
Dispatch Actions on onClick event React Component connected to Store
• Immutability • Composition • Pure Functions
*Disclaimer
React with Drupal
Use 8.2.0
None
None
None
None
Progressive Decoupling
Inside Theme
React Components Transpiled Files Includes Transpiled Files
Sessions Components Dependencies (React, ReactDOM, etc)
GET data from Drupal Update Component State Session Props
Destructured Session Props
None
None
None
Inside Module
React Components Templates to mount component Page Path Get initial
state
On visiting this URI Will be called Page title
Guzzle to Get view export data Called on ‘/sessions’ Pass
data to template Attach React Component
Mounted Component Initial State
Guzzle to Get view export data Called on ‘/sessions’ Pass
data to drupalSettings Attach React Component
Check for initial State
None
Fully Decoupled
JSON API
JSON API specification
Cleaner Output
Nested data
CLEANER OUTPUT
Sparse Fields
Sparse Fieldset Limited Fields
None
http: //con.dd/api/node/session?_format=api_json Namespace Entity Type Bundle Format Params
None
None
Apache
None
Getting Entity Collection
Getting SPECIFIC ID
ID
Authentication for CREATE, UPDATE & DELETE
OAUTH for Authentication
Post Data To Collection URL
Data to Update id = NID Session URL TO Update
Components Based on Routes on “/sessions/new” Load NewSession Component
Wrapper Component For Authenticated Routes
None
None
Demo
Thank You
Rate Our Session