摘要:
In this lesson, I use Enzyme and Jest to unit test a Counter Render Prop component. Writing integration tests are perfect for components that consume 阅读全文
摘要:
Take few examples: Full size image: The problem for that is it overflow when the screen size is smaller than the image size. (BAD) width: 100%: The pr 阅读全文
摘要:
React's abstraction over the DOM means that it's not always obvious how to do DOM-related things, like working with the HTML Canvas API. When working 阅读全文
摘要:
When the screen size is small, we can use "no more table" solution. So instead of render table is row layout, we render it in column layout. Given the 阅读全文
摘要:
In this lesson we are going to use Google's Puppeteer to gather metrics about a page's load time. We'll use a high level date subtraction method as we 阅读全文
摘要:
The React documentation has been warning us for a long time now that context shouldn't be used and that the API is unstable. Well, with the release of 阅读全文
摘要:
Every Angular CLI generated project comes already with Karmapreinstalled as well a couple of executable Jasmine specs. The default test reporter is "p 阅读全文
摘要:
1. First you have enable "Developer mode" on your mobile device. (Different device might be different) "Settings" -> Click "Build Number" 7 times. 2. 阅读全文
摘要:
Using the New Device Emulation Interface The Device Emulation interface changed a bit with the newer version of Chrome Dev Tools. Here are the instruc 阅读全文
摘要:
In a proper unit test we want to isolate external dependencies as much as possible to guarantee a reliable test outcome. Http calls represent such ext 阅读全文