write-with-webiny icon indicating copy to clipboard operation
write-with-webiny copied to clipboard

Understanding Forward Ref in React

Open VCnation opened this issue 3 years ago • 2 comments

Introduction

A ref can be automatically passed via a component to one of its children using the ref forwarding approach. For the majority of the application's components, this is often not required. However, it can be helpful for specific types of components, particularly in libraries of reusable components.

Goals

In this article, we will go through a complete discussion of the forwardRef in react. We will understand the use cases and some examples and see the importance of forwardRef.

Outline

  • Introduction
  • What is is Ref
  • How to Create Refs in React
  • Callback Refs
  • Using React.createRef() API
  • Using useRef() hook
  • Forwarding Ref with React.forwardRef()
  • Conclusion

Sample articles

https://vcnation.hashnode.dev/examine-reactivex-using-typescript-and-nodejs

https://vcnation.hashnode.dev/how-to-build-serverless-applications-using-the-serverless-framework-and-fauna

VCnation avatar Feb 06 '23 00:02 VCnation

Hello @VCnation is this article still available? I would love to handle it. Please let me know

BirdboyBolu avatar Apr 01 '23 08:04 BirdboyBolu

This particular Article “Understanding Forwad Ref in React” is no longer available. I have already written it for another publication, with the thought that I will no longer get a feedback from webiny, after sending the pitch months ago.

But nonetheless I still have some other interesting topics I can also write on, if you will give me the opportunity.

On Sat, 1 Apr 2023 at 9:30 AM Boluwatife Victor @.***> wrote:

Hello @VCnation https://github.com/VCnation is this article still available? I would love to handle it. Please let me know

— Reply to this email directly, view it on GitHub https://github.com/webiny/write-with-webiny/issues/130#issuecomment-1492877890, or unsubscribe https://github.com/notifications/unsubscribe-auth/A22HRTCWW3T7EN3QZ3XY4TDW67RQ3ANCNFSM6AAAAAAUSCIQWE . You are receiving this because you were mentioned.Message ID: @.***>

VCnation avatar Apr 01 '23 11:04 VCnation