Only use this method if when a component will stay static or pure. Re-rendering should always be done based on state or props changes. Pin On Reac…