const FancyButton = React.forwardRef((props, ref) => (
        <button ref={ref} className="FancyButton">
          {props.children}
        </button>
      ));
      
      // You can now get a ref directly to the DOM button:
      const ref = React.createRef();
      <FancyButton ref={ref}>Click me!</FancyButton>;

      Javascript language logo
      your recipe card header background
      Forwarding Refs

      React Snippets

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.