跳转到主要内容

Recoil 0.4.1

· 阅读时间为 1 分钟

Recoil 0.4.1 has been released with some performance optimizations and fixes focused on optimizing when React will re-render components based on Recoil state changes.

  • Components using selectors will no longer re-render if the selector evaluates to an equivalent value, based on reference equality.
  • Components previously rendered twice on initial render when not using React's Concurrent Mode.
  • When selectors have async dependencies that resolve, some environments of React that previously caused unnecessary re-renders no longer will.
  • Components did not always re-render properly when selectors changed async dependencies based on other dependencies.