Performance comparison between react hooks and react class