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
DevCoach 178: React | Teknik React Menghidupkan...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Nad
December 01, 2024
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DevCoach 178: React | Teknik React Menghidupkan UI dengan State
Nad
December 01, 2024
More Decks by Nad
See All by Nad
DevCoach 180: Back-End | Deploy Aplikasi dengan Aman dan Cepat Menggunakan CI/CD
nadiaaa22
0
90
DevCoach 179: Flutter | Ciptakan Animasi Epik dengan Animation
nadiaaa22
0
110
Dicoding Sharing Session: Unlocking the Machine Learning Workflow
nadiaaa22
0
100
DevCoach 176: React | Cara Jitu React Membangun UI
nadiaaa22
0
150
DevCoach 175: React | Kenalan dengan React: UI Web Masa Kini
nadiaaa22
0
90
DevCoach 174: Flutter | Bentangkan Sayap Kreativitasmu dengan Flutter Desktop
nadiaaa22
0
57
DevCoach 173: iOS | Mendalami SwiftUI, UI Framework Masa Depan!
nadiaaa22
0
140
DevCoach 172: Flutter | Tingkatkan Pengalaman Pengguna dengan Lokalisasi dan Aksesibilitas
nadiaaa22
0
120
DevCoach 171: Machine Learning in Google Cloud | Vertex AI di Google Cloud
nadiaaa22
0
270
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Claude Code のすすめ
schroneko
67
230k
Documentation Writing (for coders)
carmenintech
77
5.4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
Raft: Consensus for Rubyists
vanstee
141
7.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
610
30 Presentation Tips
portentint
PRO
1
330
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Become a Pro
speakerdeck
PRO
31
6k
Transcript
Nur Rizki Adi Curriculum Developer Teknik React Menghidupkan UI dengan
State React
Todayʼs Topics • Class, The Legacy Component • Event Handling
• React Hooks • Pengenalan React DevTools React
React
Menangani UI Kompleks dan Terisolasi Bersifat Reusable Mengapa Harus React
Component? React
createElement, The React Legacy React import React from 'react'; const
element = React.createElement( 'h1', { id: 'my-title', className: 'text-red', }, 'Biodata Perusahaan', );
Nggak ada Bedanya dengan DOM Manipulation “Biasaˮ
HTML in JS const heading = React.createElement('h1', null, 'React'); const
strong = React.createElement('strong', null, 'best tool'); const paragraph = React.createElement('p', null, ['The ', strong, ' for building UI']) const divContainer = React.createElement('div', { className: 'container' }, [heading, paragraph]); const divContainer = ( <div className="container"> <h1>React</h1> <p>The <strong>best tool</strong> for building UI</p> </div> ); HTML in JS Version
Quiz #1 DevCoach 178 React
Quiz #1 DevCoach 178 Apa nama lain dari HTML in
JS?
Dua API untuk React Component Functional Class React
“Talk is cheap, Show me The Codeˮ Linus Torvalds
Strategi React Tree TodoList App
Component State React
Quiz #2 DevCoach 178 React
Quiz #2 DevCoach 178 Apa yang terjadi jika tombol “Ubahˮ
diklik?
Component State klik! Interaksi pengguna akan memperbarui state State merupakan
data di dalam component yang bila nilainya berubah component akan me-render ulang. Nilai state akan berubah ketika ada interaksi dari pengguna.
Implementasi Component State class Counter extends React.Component { constructor(props) {
super(props); // Inisialisasi state this.state = { count: 0 }; } onIncrease() { this.setState((prevState) => { return { count: prevState.count + 1 } }); } render() { return ( <div> <h1>{this.state.count}</h1> <button onClick={() => this.onIncrease()}> Increase </button> </div> ); } }
Props Drilling
Strategi React Tree TodoList App
State component hanya tersedia di Class Component! React Jika Tanpa
React Hooks
React Hook?
legacy.reactjs.org/docs/hooks-intro.html
Quiz #3 DevCoach 178 React
Apa yang terjadi jika tombol “Tambahˮ diklik? Quiz #3 DevCoach
178 React
Terima kasih nurrizkiadip Nur Rizki Adi Prasetyo NAdiprasetyo
[email protected]
Nur
Rizki Adi Prasetyo React
Feedback! dicoding.id/devcoachfeedback React
None