Javascript – React.js Pure and impure components
So, I am learning react.js and was looking at the documentation where they have given a code for impure component let guest = 0; function Cup() { // Bad: changing a preexisting variable! guest = guest + 1; return <h2>Tea…