Easy Type Checking & Validating props in ReactJS | Proptypes | React JS Tutorial
Type Checking is a method to validate data type that you pass through different child components. The component that is receiving the data validates whether it is receiving valid data type or not. Proptypes is a package that allows you to easily check data type for props. Type checking is always a good idea. It ensures maintainable code that can be confidently shared with other software developers to work on. Software engineering is done in teams so you want to make sure that everybody is on same page. Type checking adds check point in components that throw warning or error in case invalid data of wrong type is being passed through a component.
As your app grows, you will have a lot of components that will take and pass properties / props in between each other and it's easy to lost track of what type of data a component requires and so you can pass, lets say, string data where a component required a number value. You can catch a lot of bugs with type checking. To avoid such mistakes, you need some mechanism to check type for your data. To answer this issue, there are several tools and techniques that are available, like Flow, TypeScript and propTypes. We will explore PropTypes in this RectJS tutorial. You can define which type of data you are passing through components and it will warn you if the data type is wrong or in case you just forgot to send a required value as prop to a child component.
PropTypes
► https://reactjs.org/docs/typechecking-with-proptypes.html
► https://www.npmjs.com/package/prop-types
✅ Display Data From JSON File in React
https://youtu.be/4fCr1IepJRw
✅ Display Icons / Images from JSON File in React JS
https://youtu.be/NWG1Ygt1k1k
✅ Fetch All Types of Data from JSON File in React JS
https://youtu.be/8nkVXiGH-7I
✅ 7 Ways to use Images in React JS
https://youtu.be/U07wzhfu66M
✅ Easy Way to use Images in React JS
https://youtu.be/0EtYzQn-Scw
✅ Require Image Not Working in React JS
https://www.youtube.com/watch?v=ay6id01369s
✅ Multiple Images in One Import
https://www.youtube.com/watch?v=gEMAZSO85KY
✅ Multiple Sets of Images from One Import in React JS
https://www.youtube.com/watch?v=SpjzhwcMcbs
✅ Default Map is not a Function in React JS
https://www.youtube.com/watch?v=XMm12Dw_Kpw
✅ Async Await Fetch in React JS
https://www.youtube.com/watch?v=9fr7ytpvybY
✅ Assigned a Value but Never Used
https://youtu.be/3_4QlPxuEK4
✅ Easily Sort Before Displaying Records in React JS
https://youtu.be/zZzcnmU_LoU
✅ Responsive Image Gallery from Scratch in React JS
https://youtu.be/J1dg4WXr3cg
✅ ReactJS Playground
https://youtube.com/playlist?list=PL1w28LzkbaQEdqbLVVGuR46lriyR_Ifiy
✅ JavaScript Problem Solving:
http://bit.ly/JavsScriptProblemSolving
✅ Web Development Essentials:
http://bit.ly/WebDevEssentials
✅ Crash Courses:
http://bit.ly/WSPCrashCourses
Channel: https://www.youtube.com/webstylepress
Website: https://www.webstylepress.com
FaceBook: https://www.facebook.com/webstylepress/
Twitter: https://twitter.com/webstylepress
Instagram: https://www.instagram.com/webstylepress
LinkedIn: https://www.linkedin.com/company/webstylepress
GitHub: https://github.com/webstylepress
#reactjs #javascript #js #webdevelopment #webstylepress #javascripttraining #react
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Easy Type Checking & Validating props in ReactJS | Proptypes | React JS Tutorial», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.