From 19750973677049434d7896371920da4107f3b0b0 Mon Sep 17 00:00:00 2001 From: Justin Greenberg Date: Thu, 3 Nov 2016 03:39:11 -0400 Subject: [PATCH] feat(example): Add SCU pattern to FeaturePage (#1178) companion to #811 the `FeaturePage` component class slipped through the cracks of #811, since it used to be a functional component when it was opened... since this component is completely static, adds a `shouldComponentUpdate` that returns false and comment with explanation --- app/containers/FeaturePage/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/containers/FeaturePage/index.js b/app/containers/FeaturePage/index.js index 69140b948f..6b57202c5c 100644 --- a/app/containers/FeaturePage/index.js +++ b/app/containers/FeaturePage/index.js @@ -14,6 +14,13 @@ import ListItem from './ListItem'; import ListItemTitle from './ListItemTitle'; export default class FeaturePage extends React.Component { // eslint-disable-line react/prefer-stateless-function + + // Since state and props are static, + // there's no need to re-render this component + shouldComponentUpdate() { + return false; + } + render() { return (