ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

React Event Handling - MicroBytes 2020

react tutorial

react js

react tutorial for beginners

reactjs tutorial

reactjs tutorial for beginners

react basics

react fundamentals

web development

learn to code

react event handling

learn react

react handling events

react js event handling

reactjs events

reactjs event handlers

react js event handlers

event handling

react class event

react binding

react bind explained

reactjs bind

reactjs onclick function

react onclick

react onclick event

Автор: codeSTACKr

Загружено: 2020-04-21

Просмотров: 3081

Описание: Handling events with React elements is very similar to handling events on DOM elements. But there are some syntax differences. React uses camelCase to define events such as onClick.

When you define a component using an ES6 class, a common pattern is for an event handler to be a method on the class.

You have to be careful about the meaning of `this` in JSX callbacks. In JavaScript, class methods are not bound by default. If you forget to bind `this.handleClick` and pass it to `onClick`, `this` will be `undefined` when the function is actually called.

This is not React-specific behavior; it is a part of how functions work in JavaScript. Generally, if you refer to a method without `()` after it, such as `onClick={this.handleClick}`, you should bind that method.

This is yet another reason why using function-based components instead of class-based is now recommended by React.
_____________________________________

📚 Learn to CODE in just a FEW months here:
Treehouse Discount Code: https://treehouse.7eer.net/codeSTACKr
_____________________________________

🛠️ Tools I use:
🟠 Theme: https://marketplace.visualstudio.com/...
🟠 Font: STACKr Code (Exclusive to my VS Code Course - https://vsCodeHero.com)
🟠 SuperHero Extension Pack: https://marketplace.visualstudio.com/...

🚢 Deploy for FREE on Vercel: https://vercel.com/ambassadors/codest...
_____________________________________

💖 Show support!
PayPal: https://paypal.me/codeSTACKr
_____________________________________

Watch Next:
Web Development - Beginners Roadmap (2020) -    • Web Developer Roadmap 2020 | A Guide To St...  
Playlist: Web Development For Beginners -    • Web Development - Beginners Roadmap (2019)  
_____________________________________

Connect With Me:
Website: http://www.codestackr.com
Twitter:   / codestackr  
Instagram:   / codestackr  
Facebook:   / codestackr  
_____________________________________

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

#codeSTACKr #ReactJS #React

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
React Event Handling - MicroBytes 2020

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]