First time you look into all the charts, you have no idea what means what. What do those different colors even mean? It’s not self-explanatory at all. There needs to be a guidebook.
In this article,
I wrote some short components,
<Item /> and
<LongList />, to make an example for our article.
And it’s showing me this, which…
We had a bunch of large component trees in our company’s web application. And I saw them re-rendering from the top to deep down to the bottom for no reason. At first, I thought it would be easy to get them correct.
Of course, the tree was much bigger than this. The tree didn’t just reach the end. This made useless re-rendering even a bigger concern. From the top to bottom,
ComponentB, .... and so on.
And I saw that there were no use of
memo in our app yet. …
This is a full guide to setup, develop and deploy a backend app with a recently released container image feature for lambda on AWS.
Needless to say, if you are a great fan of Docker, you would know how amazing it is. What you test on local is what you get when you deploy it, at least at the container level.
Since this feature is quite new, there have been lots of rabbit holes I fell into, and I’m sure others will too, so I will break every piece of rabbit hole down so that nobody gets trapped into it…
Disclaimer: We will focus on
useSelector itself in this article, rather than third-party libraries like
reselect, because it's out of the scope of the article.
Now, before talking about
useSelector, we need to know some background. Let's go back to pre-function component era, where all we needed to care about where the
props. Not so much you needed to do. Choices were
shouldComponentUpdate. Nothing else. Like this:
Right. So if you make such component, this component is only going to update when
shouldShowRed is changed. Otherwise, it is going to stay still even if its parent renders…
I was struggling at my company trying to write some tests for redux-observable operations. Most of the network requests were managed by RxJS, and none of them were covered by tests. I wanted to write tests but just did not know how to.
But I really just wanted to start from the basics — I mean, the very basics, including why, and how we might want to use
If you want to hop straight into the source code, here it is.
Reactive programming is programming with asynchronous data streams.
I was coding as usual. And I faced an odd encounter with how
forEach works. Here goes the code to give an example of that. Imagine the code below is the code from one of the libraries I was using:
And I spotted the code in my company’s app that was kind of doing:
Of course, I did not want this. It’s against DRY principle. So I refactored the code to:
Cooler and more succinct.
But I was very well tricked into thinking that this would just work. See what this code gave:
Oops. Everybody’s dead…