04 2018 档案
摘要:How to install Flask Use Flask to create a minimal website Build routes in Flask to respond to website endpoints Use Variable Rules to pass parts of t
阅读全文
摘要: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
阅读全文
摘要:Went though tow youtube videos about NGXS https://angularfirebase.com/lessons/ngxs-quick-start-angular-state-management/ https://www.youtube.com/watch
阅读全文
摘要:Mocha uses a default timeout of 2000 ms. However, if for some reason that does not work for your use case, you can increase the timeout for a particul
阅读全文
摘要:In large React Native projects, it’s common to have long relative import paths like: With import paths that go up and down the folder hierarchy like t
阅读全文
摘要:We will learn how to convert variable arguments by using rest operator in JavaScript. Scss "$shadows..." the same as "...shadows" in Javascript. inter
阅读全文
摘要:This is just a learning blog post, check out the talk. 1. Custom pipeable operators: Custom pipeable operator is just a high order function which retu
阅读全文
摘要:In this post, we are going to see how to solve one design pattern challenge. The challenge is what we a simplest way to find out the children elements
阅读全文
摘要:In some cases, you want to get fresh data instead of cache data to the screen, such as stock applications. Only fallback to cache data if cannot get r
阅读全文
摘要:If you want to cache API response by using angular service-worker, you can do it in: src/ngsw-config.json:
阅读全文
摘要:Proxy and Reflect API works nicely together. About how to use Proxy, check this post. Let's see about Reflect API: For proxy and Reflect, their API is
阅读全文
摘要:If our PWA application has a new version including some fixes and new features. By default, when you refresh your page, service worker will check ngsw
阅读全文
摘要:If you alread have an existing Angular application and want to upgrade to progressive web app. 1. Install @angular/service-worker: 2. Create a file: s
阅读全文
摘要:There are many techniques for hiding content in user interfaces, and not all are created equal! Learn how different hiding techniques in HTML, CSS and
阅读全文
摘要:An Angular service registered on the NgModule is globally visible on the entire application. Moreover it is a singleton instance, so every component t
阅读全文
摘要:Icon buttons are very common in web applications, yet they often have accessibility problems. Learn how to make your icon buttons accessible to keyboa
阅读全文
摘要:When creating UIs with utility classes, a lot of repetition can occur within the HTML markup. In this lesson, we see how this concern can be addressed
阅读全文
摘要:Sometimes, you want to resues object type when doing mutation, you can use 'input' type to help: Doc
阅读全文
摘要:You are able to extend the custom css with hover, focus, group-hover, responsive variants class in tailwind. https://tailwindcss.com/docs/functions-an
阅读全文
摘要:In this lesson, we learn how to control what utility classes are generated for each utility class module. We look at how we can “opt-in” for responsiv
阅读全文
摘要:In this lesson, we learn how to target specific states of elements and apply styles only when those states are triggered.
阅读全文
摘要:In this lesson, we take a look at tailwind's mobile-first CSS architecture and learn how to apply styles to specific media queries only. We also disco
阅读全文
摘要:In this lesson, we learn how to generate custom utility classes in tailwind. We add new properties to our JavaScript config object to generate new hel
阅读全文
摘要:In this lesson, we learn how to generate CSS utility classes from Tailwind's JavaScript config file. We set up a new project from scratch, install tai
阅读全文
摘要:"Paint" is one of the most preference killer, it can easily cost more than 60fps, and once you trigger "Paint" it always trigger "Composite" as well.
阅读全文
摘要:In our dynamic forms lessons we obviously didn’t account for all the various edge cases you might come across. Therefore if you need a more complex se
阅读全文
[React Router] Create a ProtectedRoute Component in React Router (setState callback to force update)
摘要: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
阅读全文
摘要:When tigger site updates the layout, it always follow this order: Javascript trigger style changes, then layout changes then broswer do the paint and
阅读全文
摘要:In this lesson we'll show how to setup the Prompt component from React Router. We'll prompt with a static message, as well as a dynamic method with th
阅读全文
摘要:What is web worker for? OK, read it docs to get full details idea. Or just a quick intro to web worker. Web worker, open another thread in the backgro
阅读全文
摘要:In this lesson, we look at where we came from with refs in React. Starting with the deprecated string ref pattern, callback refs, and then how to use
阅读全文
摘要:In this lesson we look at how the Apollo @client directive can be used to fetch client-side state along with server data with one query. I also show h
阅读全文
摘要:So when you using input binding in Angular, it will always check for update. If you want to improve youre preformence a little bit, you can use @Attri
阅读全文