score:0

let childThing = null;
const Child = props => {
   if(childThing === null)
       childThing = props.thing
   return <div>I want {childThing} to be initial value without updating</div>
}

score:2

const Child = props => {
  let thing = props.thing;
  let [initialValue, setInitialValue] = useState("");

  useEffect(() => {
    setInitialValue(thing);
  }, []);

  return (
    <div>
      I want <strong>{initialValue}</strong> to be initial value without
      updating
    </div>
  );
};

Related Query

More Query from same tag