Skip to content

Optimizations

Compare
Choose a tag to compare
@ryandrewjohnson ryandrewjohnson released this 26 Jul 02:18
· 165 commits to master since this release

Before Optimization

  • Any connected component using the getTranslate selector would re-render whenever any Redux action was dispatched.

After Optimization

  • The getTranslate selector will only trigger a re-render if the translation data is updated using the addTranslation action creator, or if the languages or active language changes using setLanguages or setActiveLanguage action creator.

NOTE: if your component is connected to other slices of state along with getTranslate a re-render will occur if any of the other connected state items change.