« first day (3892 days earlier)      last day (1041 days later) » 

4:27 AM
 
 
5 hours later…
9:13 AM
I am trying to do some exercise in react hooks. the below example is from react documentation,

import React, { useState } from 'react';

function Example() {
  // Declare a new state variable, which we'll call "count"
  const [count, setCount] = useState(0);

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>
        Click me
      </button>
    </div>
  );
}
______________________________________________

The example that I am trying is,



function CheckBottle(props){
  const [lid, setLid] = useState('open');

  return(
    <>
      <input type="button" value="Bottle" onClick={() => setLid('lid', 'close')} />
    </>
  );
}

ReactDOM.render(<CheckBottle />, document.getElementById("root"));
 
 
8 hours later…
5:40 PM
by the @makadev sorry for too much thinking... and discussing... now i got clarity as it's so simple to understand after RE-READING the react documentation... now I am building something in next.js
thanks for discussing and making me understand!!!
 
 
4 hours later…
DRP
9:16 PM
hi team, anyone around?
 

« first day (3892 days earlier)      last day (1041 days later) »