However, when an action is dispatched to the Redux store, useSelector() only forces a re-render if the selector result appears to be different than the last result. As of v7.1.0-alpha.5, the default comparison is a strict === reference comparison. This is different than connect(), which uses shallow equality checks on the results of mapState calls to determine if re-rendering is needed. This has several implications on how you should use useSelector().
回到例子
这也就符合了文档上描述的 always force a re-render by default
也就是说当前 store 作用域内(Provider 内),任意一个 action 被 dispatch,例子中的 selector 被执行后每次都会返回一个新的对象,并会强行触发一个 re-render,引发性能问题。