Unit Testing con Jest + Enzime para ReactJsGabrielComas2
Introducción a Unit Testing con Jest + Enzime para ReactJs.
¿Es realmente necesario testear nuestros componentes antes de salir a producción? Definitivamente!. Esto te evitará problemas a futuro, gracias al control de las respuestas de nuestros componentes en el DOM, ganarás confianza y a la vez te sentirás más tranquilo a la hora de programar junto a tu equipo.
Estableciendo unas simples reglas, el camino de desarrollo a producción será mucho más sencillo y llevadero.
La presentación abarca desde la configuración de nuestras librerías hasta la creación de Mocks y Snapshots.
Saludos y que lo disfruten!
Gabriel Comas - Desarrollador Front End.
Классические архитектуры во фронтенде / Александра Шинкевич (LOVATA)Ontico
Responsive web design, HTML5, CSS3, IDE, API, React, Angular, веб-компоненты, БЭМ... Опытным фронтендерам эти слова давно знакомы. А как насчет таких классических архитектур как MVC, MVP или MVVM? Знаете ли вы, что такое MVP, и почему Angular.js построен на паттерне MVVM, а не MVC, хотя в этом фреймворке активно используется понятие "контроллер"? Чем эти три архитектуры отличаются друг от друга, и зачем, вообще, о них нужно знать фронтендеру?
В своем докладе я хочу рассмотреть эти три понятия как с теоретической (история, концепция, назначение), так и с практической точки зрения. На простых примерах я покажу, как можно организовать ту или иную архитектуру во фронтендовой части веб-приложения, а также рассмотрю некоторые архитектурные паттерны, которые позволяют увеличить читабельность и добавить модульность и переносимость кода.
This document provides an overview of React, including initial reactions to it, fundamental concepts like components and one-way data flow, and how the virtual DOM works. Some key points covered include:
- Initial reactions to React were mixed, with some finding it "ugly" but others seeing benefits like separation of concerns with components.
- Everything in React is a component, with data flowing in one direction from parent to child via props. State is mutable within a component.
- By using a virtual DOM, React can efficiently update the real DOM by only making necessary changes, keeping the interface fast and pure.
React is a different way to write JavaScript apps. When it was introduced at JSConf US in May, the audience was shocked by some of its design principles. One sarcastic tweet from an audience member ended up describing React’s philosophy quite accurately: https://twitter.com/cowboy/status/339858717451362304
We’re trying to push the limits of what’s possible on the web with React. My talk will start with a brief introduction to the framework, and then dive into three controversial topics: Throwing out the notion of templates and building views with JavaScript, “re-rendering” your entire application when your data changes, and a lightweight implementation of the DOM and events.
This document provides an overview of React, including initial reactions to it, fundamental concepts like components and one-way data flow, and how the virtual DOM works. Some key points covered include:
- Initial reactions to React were mixed, with some finding it "ugly" but others seeing benefits like separation of concerns with components.
- Everything in React is a component, with data flowing in one direction from parent to child via props. State is mutable within a component.
- By using a virtual DOM, React can efficiently update the real DOM by only making necessary changes, keeping the interface fast and pure.
React is a different way to write JavaScript apps. When it was introduced at JSConf US in May, the audience was shocked by some of its design principles. One sarcastic tweet from an audience member ended up describing React’s philosophy quite accurately: https://twitter.com/cowboy/status/339858717451362304
We’re trying to push the limits of what’s possible on the web with React. My talk will start with a brief introduction to the framework, and then dive into three controversial topics: Throwing out the notion of templates and building views with JavaScript, “re-rendering” your entire application when your data changes, and a lightweight implementation of the DOM and events.
2. React 學習目標
1. 元件之間的溝通 (parent vs children )
2. Props vs State
目前我把他解讀是....
Props 靜態 (初使化設定)
State 動態 (可被改變 ex:setState()…)
3. 透過 refs 取得dom 裡面的值
3. Example
1. props example - “Hello World”
2. state example - “Hello xxx”
http://jsbin.com/kodalu/1/edit?js,output