Disable IPv6 on Ubuntu 22.04 via sysctl settings

Check if IPv6 is disabled

sysctl -a 2>/dev/null | grep disable_ipv6

Disabling IPv6 temporarily

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1

Disabling IPv6  Permanently

sudo nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6 = 1
sysctl -p

References
https://www.thegeekdiary.com/how-to-disable-ipv6-on-ubuntu-18-04-bionic-beaver-linux/
https://www.golinuxcloud.com/linux-check-ipv6-enabled/
https://www.garron.me/en/go2linux/sysctl-linux.html

useRef Hook in React

useRef createRef
It is a hook. It is a function.
It uses the same ref throughout. It creates a new ref every time.
It saves its value between re-renders in a functional component. It creates a new ref for every re-render.
It persists the existing ref between re-renders. It does not persist the existing ref between re-renders.
It returns a mutable ref object. It also returns a mutable ref object.
The refs created using the useRef can persist for the entire component lifetime. The refs created using the createRef can be referenced throughout the component.
It is used in functional components. It is used in class components. It can also be used in functional components but might show inconsistencies.
function FancyInput(props, ref) {
  const inputRef = useRef();
  useImperativeHandle(ref, () => ({
    focus: () => {
      inputRef.current.focus();
    }
  }));
  return <input ref={inputRef} ... />;
}
FancyInput = forwardRef(FancyInput);

References
https://reactjs.org/docs/hooks-reference.html#useref
https://www.geeksforgeeks.org/difference-between-useref-and-createref-in-reactjs/
https://stackoverflow.com/questions/54620698/whats-the-difference-between-useref-and-createref