随笔分类 - React
摘要:Event handlers are passed an instance of SyntheticEvent in React. In this video we'll take a look at the wide range of events available to us, includi
阅读全文
摘要:Using pushState and passing route data via context allows our application to respond to route changes made from Link components, but using the back an
阅读全文
摘要:We’ll create a Router component that will wrap our application and manage all URL related state. We’ll see how we can use React’s built in context mec
阅读全文
摘要:In this lesson we’ll see how to pass an item’s id value in an event handler and get the state to reflect our change. We’ll also create a helper functi
阅读全文
摘要:Add functional function such as change state, this should have tests covered. For example, in a component, there is a function call 'addBox': Here we
阅读全文
摘要:In React app, you might create lots of components. We can use index.js to do both 'import' & 'export'. When using it, we just need to import the folde
阅读全文
摘要:The data contained in this.props.children is not always what you might expect. React provides React.children to allow for a more consistent developmen
阅读全文
摘要:Public Class Fields allow you to add instance properties to the class definition with the assignment operator (=). In this lesson, we'll look at their
阅读全文
摘要:We are going to ensure our app is structured in a clear way using functional components. Then, we are going to pass those components state values from
阅读全文
摘要:In this lesson, we'll use next to create a universal React application with no configuration. We'll create page components that will render on the ser
阅读全文
摘要:Derivations form the backbone of MobX and come in two flavors: computed values are values that can be derived from the state automatically. And reacti
阅读全文
摘要:If you have props and actions, you want one component to access those props and actions, one solution is pass those from parent to this component. But
阅读全文
摘要:Aphrodite is a library styling React components. You get all the benefits of inline styles (encapsulation, no build step, no CSS cascade, building up
阅读全文
摘要:To make more composable React components, you can define common APIs for similar component types.
阅读全文
摘要:The React component lifecycle will allow you to update your components at runtime. This lesson will explore how to do that. The React component lifecy
阅读全文
摘要:The previous lesson introduced the React component lifecycle mounting and unmounting. In this lesson you will learn some simple uses for these hooks.
阅读全文
摘要:React components have a lifecycle, and you are able to access specific phases of that lifecycle. This lesson will introduce mounting and unmounting of
阅读全文
摘要:When you are using React components you need to be able to access specific references to individual components. This is done by defining a ref. Notice
阅读全文
摘要:When you're building your React components, you'll probably want to access child properties of the markup. In Angular, it is transcludion: In React, i
阅读全文
摘要:The owner-ownee relationship is used to designate a parent-child relationship with React components as it differs from the DOM relationship.
阅读全文