r/backtickbot • • Mar 20 '21

https://np.reddit.com/r/Clojure/comments/m8znzv/evolution_of_reactjs_vs_reagent_2013_2021/grl08kf/

const PizzaPreview = ({ pizzaType }) => {
  const [quantity, setQuantity] = useState(0);
  const handleIncrement = () => setQuantity(quantity + 1);

  return (
    <div>
      <p>I luv {pizzaType} pizza</p>
      <button onClick={handleIncrement}>Increment</button>
    </div>
  );
};
1 Upvotes

0 comments sorted by