随笔分类 -  React

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 23 下一页
摘要:create-react-app version 2.0 added a lot of new features. One of the new features is upgrading to Babel Version 7, which enables the Short Syntax of R 阅读全文
posted @ 2018-10-16 02:49 Zhentiw 阅读(175) 评论(0) 推荐(0)
摘要:create-react-app version 2.0 added a lot of new features. One of the new features is added the svgr webpack loader to wrap SVGs in React components as 阅读全文
posted @ 2018-10-05 02:22 Zhentiw 阅读(615) 评论(0) 推荐(0)
摘要:In this lesson, you will learn how to use PureComponent in React to reduce the number of times your component re-renders. This works because PureCompo 阅读全文
posted @ 2018-09-29 03:25 Zhentiw 阅读(134) 评论(0) 推荐(0)
摘要:Sometimes you have common use cases that require common props to be applied to certain elements. You can collect these props into an object for users 阅读全文
posted @ 2018-09-04 01:58 Zhentiw 阅读(377) 评论(0) 推荐(0)
摘要:Due to the way that React Context Providers work, our current implementation re-renders all our compound component consumers with every render of the  阅读全文
posted @ 2018-08-29 03:34 Zhentiw 阅读(496) 评论(0) 推荐(0)
摘要:If someone uses one of our compound components outside the React.createContext <ToggleContext.Provider />, they will experience a confusing error. We 阅读全文
posted @ 2018-08-29 03:32 Zhentiw 阅读(270) 评论(0) 推荐(0)
摘要:Our current compound component implementation is great, but it's limited in that users cannot render the structure they need. Let's allow the user to 阅读全文
posted @ 2018-08-27 14:44 Zhentiw 阅读(337) 评论(0) 推荐(0)
摘要:In this lesson we'll use React Live to preview and edit a component directly in the browser. React Live is a great tool for rendering interactive docu 阅读全文
posted @ 2018-08-18 21:53 Zhentiw 阅读(270) 评论(0) 推荐(0)
摘要:In this lesson we'll use mdx-deck to create a slide deck using Markdown and React. We'll look at adding multiple slides, code snippets, and importing 阅读全文
posted @ 2018-08-17 02:42 Zhentiw 阅读(432) 评论(0) 推荐(0)
摘要:You often find duplication between the name of a prop and a variable you will assign to the prop. JSX allows you to spread an object containing your n 阅读全文
posted @ 2018-08-17 02:13 Zhentiw 阅读(203) 评论(0) 推荐(0)
摘要:Storybook is a UI component development environment for React, Vue, and Angular. With that, you can develop UI components without running your app. He 阅读全文
posted @ 2018-07-12 19:05 Zhentiw 阅读(333) 评论(0) 推荐(0)
摘要:We want to make sure that when we ship new code, our users can use the application. The best way we've found to do that is to write automated tests th 阅读全文
posted @ 2018-07-09 18:39 Zhentiw 阅读(241) 评论(0) 推荐(0)
摘要:In this lesson, I refactor a simple Counter component connected to Redux to use Unstated instead. I explain some of the cognitive overhead of working 阅读全文
posted @ 2018-06-17 11:26 Zhentiw 阅读(272) 评论(0) 推荐(0)
摘要:In this lesson I refactor some code that utilizes the Mutation component to update client-side cache to use the new ApolloConsumer component baked int 阅读全文
posted @ 2018-05-13 01:46 Zhentiw 阅读(397) 评论(0) 推荐(0)
摘要:getSnapshotBeforeUpdate is a lifecycle hook that was introduced with React 16.3. It is invoked right before the most recently rendered output is commi 阅读全文
posted @ 2018-05-08 19:24 Zhentiw 阅读(278) 评论(0) 推荐(0)
摘要:getDerivedStateFromProps is lifecycle hook introduced with React 16.3 and intended as a replacement for componentWillReceiveProps. It is invoked after 阅读全文
posted @ 2018-05-08 19:19 Zhentiw 阅读(601) 评论(0) 推荐(0)
摘要:The function forwardRef allows us to extract a ref and pass it to its descendants. This is a powerful tool, but should be used with caution to avoid u 阅读全文
posted @ 2018-05-07 16:42 Zhentiw 阅读(567) 评论(0) 推荐(0)
摘要:The componentWillReceiveProps() method is being deprecated in future version of React (17). Many of us use this method day-to-day to check for incomin 阅读全文
posted @ 2018-05-02 18:51 Zhentiw 阅读(754) 评论(0) 推荐(0)
摘要:In this lesson I refactor a React component that utilizes a higher-order component for mutations to the new Mutation render prop component baked into 阅读全文
posted @ 2018-04-30 15:44 Zhentiw 阅读(281) 评论(0) 推荐(0)
摘要:In this lesson we'll create a protected route just for logged in users. We'll combine a Route with a render prop and use a loggedIn prop to determine 阅读全文
posted @ 2018-04-08 19:20 Zhentiw 阅读(274) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 23 下一页