Writing reusable React components can be difficult due to the need of custom appearance and behavior. As components authors we can achieve this by leaving the actual rendering of HTML/CSS to the component’s user. In this talk, Yakir Narkis shows a real life use case and code of a React component that don’t own rendering. Yakir shows advanced code patterns for writing React components that implement a concept called Inversion of Control, in order to achieve code reusability while keeping an easy to use API.
You can find the sample code here https://codesandbox.io/s/vmv86zom85.
For more engineering updates and insights:
Follow us on Twitter → / wixeng
Subscribe our monthly newsletter → https://www.wix.engineering/subscribe
Visit our blog → https://www.wix.engineering/blog
Follow our Medium publication → / wix
Смотрите видео Writing reusable UI components - Yakir Narkis онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Wix Engineering Tech Talks 10 Июнь 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,992 раз и оно понравилось 75 людям.