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
Bassam Ismail
October 04, 2016
Technology
690
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React Front-end For Your Drupal 8 Back-end
Bassam Ismail
October 04, 2016
More Decks by Bassam Ismail
See All by Bassam Ismail
CSS Architecture with OOCSS, SMACSS, and BEM
skippednote
3
190
Other Decks in Technology
See All in Technology
“全部コピーしない”ファイルデータの活用 : — FSx for ONTAP × S3 Tables × Icebergで作るメタデータカタログ
yoshiki0705
0
120
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
160
テスト設計の本質を改めて考えてみる~生成AIを活用する時代だからこそ、作ったテストの説明性を高めよう~
yamasaki696
1
230
IaC コードを資産へ:AWS CDK 社内ライブラリと横断展開 / aws-summit-japan-2026
gotok365
10
1.7k
4人目のSREはAgent
tanimuyk
0
320
AWS PrivateLink × SCIM で実現する セキュアで運⽤負荷の低い Databricks 基盤の構築
tsuda7
0
120
BPaaSで進むAIオペレーションの現在地 AI実装が効く領域とスケーラビリティの選定と実装
kentarofujii
0
230
AI-DLCを “そのまま導入しなかった”話 ~組織に合わせてアジャストした 私たちの実践共有~
hiroramos4
PRO
1
480
AI時代における最適なQA組織の作り方
ymty
3
300
徹底討論!ECS vs EKS!
daitak
3
1.8k
NDIAS CTF 2026 問題解説会資料
bata_24
0
150
組織における AI-DLC 実践
askul
0
240
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
160
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Technical Leadership for Architectural Decision Making
baasie
3
430
Deep Space Network (abreviated)
tonyrice
0
220
Side Projects
sachag
455
43k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Thoughts on Productivity
jonyablonski
76
5.2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
600
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