随笔分类 -  React

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页
摘要:Forms in React are not easy. T hey are verbose and several lines of code. However, forms with Formik are much simpler. Formik maintains the state of i 阅读全文
posted @ 2019-03-05 19:33 Zhentiw 阅读(216) 评论(0) 推荐(0)
摘要:Got the idea form this lesson. Not sure whether it is the ncessary, no othere better way to handle it. Have a TodoList component, every time types in 阅读全文
posted @ 2019-02-25 17:30 Zhentiw 阅读(685) 评论(0) 推荐(0)
摘要:As an alternate to useState, you could also use the useReducer hook that provides state and a dispatch method for triggering actions. In this lesson, 阅读全文
posted @ 2019-02-24 17:28 Zhentiw 阅读(443) 评论(0) 推荐(0)
摘要:In the class version of this component, we had a method called safeSetState which would check whether the component was still mounted before trying to 阅读全文
posted @ 2019-02-21 01:23 Zhentiw 阅读(861) 评论(0) 推荐(0)
摘要:Thanks to react-testing-library our tests are free of implementation details, so when we refactor components to hooks we generally don't need to make 阅读全文
posted @ 2019-02-19 22:53 Zhentiw 阅读(1219) 评论(0) 推荐(0)
摘要:We have a render prop based class component that allows us to make a GraphQL request with a given query string and variables and uses a GitHub graphql 阅读全文
posted @ 2019-02-17 23:14 Zhentiw 阅读(527) 评论(0) 推荐(0)
摘要:We would like the ability to group a series of actions to be dispatched with single dispatching functions used as handlers in various parts of our gam 阅读全文
posted @ 2019-02-12 19:44 Zhentiw 阅读(227) 评论(0) 推荐(0)
摘要:With our Redux implementation lousy with State ADT based reducers, it is time to hook it all up to a React Shell. Having already built out some UI/UX 阅读全文
posted @ 2019-02-11 20:02 Zhentiw 阅读(402) 评论(0) 推荐(0)
摘要:If the user hasn't used your application for a few minutes, you may want to log them out of the application automatically in case they've stepped away 阅读全文
posted @ 2019-02-07 17:06 Zhentiw 阅读(684) 评论(0) 推荐(0)
摘要:We sometimes just want to return a couple of elements next to one another from a React functional component, without adding a wrapper component which 阅读全文
posted @ 2019-01-13 18:06 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要:It's important that our users enjoy using our application or website. One way we can make it happen is by adding microinteractions to subtly reward ou 阅读全文
posted @ 2019-01-08 20:42 Zhentiw 阅读(227) 评论(0) 推荐(0)
摘要:On Android and in Chrome (but not on iOS), it's possible to send push notifications with a PWA. We'll start by asking the user for permission to send 阅读全文
posted @ 2019-01-02 03:28 Zhentiw 阅读(828) 评论(0) 推荐(0)
摘要:It's possible to access some, but not all, of the native device features from a PWA. One that we canaccess, is the camera and camera roll. We'll use t 阅读全文
posted @ 2018-12-31 21:38 Zhentiw 阅读(813) 评论(0) 推荐(0)
摘要:The default service worker that comes with create-react-app doesn't allow for very much configuration. We'll replace that default service worker in tw 阅读全文
posted @ 2018-12-28 20:56 Zhentiw 阅读(1030) 评论(0) 推荐(0)
摘要:Transpile Modules with Babel in Jest Tests Jest automatically loads and applies our babel configuration. However, because our project takes advantage 阅读全文
posted @ 2018-11-14 02:53 Zhentiw 阅读(929) 评论(0) 推荐(0)
摘要:It can be incredibly frustrating to spend a few minutes filling out a form only to accidentally lose all of your progress by the browser closer, the p 阅读全文
posted @ 2018-11-09 16:49 Zhentiw 阅读(361) 评论(0) 推荐(0)
摘要:The AbortController interface enables us to cancel a one or more DOM requests. In this lesson, we will demonstrate how to use the controller to cancel 阅读全文
posted @ 2018-11-06 16:06 Zhentiw 阅读(351) 评论(0) 推荐(0)
摘要:A new Higher Order Component (HOC) was recently released in React v16.6.0 called React.memo. This behavior of the HOC is similar to what you’d get whe 阅读全文
posted @ 2018-10-30 22:01 Zhentiw 阅读(320) 评论(0) 推荐(0)
摘要:In this lesson I demonstrate how to use the library MDXC to create and import React components with Markdown. MDXC converts markdown into JavaScript a 阅读全文
posted @ 2018-10-22 03:20 Zhentiw 阅读(258) 评论(0) 推荐(0)
摘要:In this lesson, you will learn how to extend styles from one styled-component to another in a React app. This is helpful when you have two styled-comp 阅读全文
posted @ 2018-10-21 03:20 Zhentiw 阅读(248) 评论(0) 推荐(0)

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