In this article, we will see what is the major difference between useRef and createRef along with some examples and when to use each one. createRef createRef is used in the class components to create and manage the references to…
Programming
In reactJS, when an event occurs it is propagated from the innermost element that triggered the event to its parent elements, until it reaches the topmost element in the DOM. This is also known as the ‘event bubbling‘. There are…
In this article, we will see how to update the state on the button click in reactJS. We use the useState hook to manage the state in reactJS. useState hook returns the state variable and a callback function to update…
In this article, we will see how to make API calls using the functional components. Importing required libraries: There are some libraries available and by using those we can make API requests in react. For this, we can use the…
In this article, we will see how to use git checkout to create a local copy of a remote branch. In order to create a local copy of remote branch, First, we need to fetch the remote branch. Open the…
In this article, we will see how to configure SSH keys in git for windows. What is SSH? SSH (secure shell) is a protocol used for secure communication between two computers. SSH uses a key-pair also known as public key…
In golang, backquoted strings are used to create a string literals that contains the special characters and line breaks. These strings are also known as the “raw strings” and enclosed by backticks (`) instead of double quotes (“”). In this…
In this article, we will see how to use timeouts with channels in golang. What are channels in golang? Channels are a powerful tool for communicating between goroutines. However, in some scenarios we may need to set a timeout for…
In this article, we will see how to check if a variable is an array or slice in Golang. To determine if a variable is an array or slice using reflection, we can use the “reflect” package in Golang. Using…
In this article, we will see how to access a map using its reference in golang. What is map? A map is a collection of key-value pairs, where each key is unique, and its corresponding value can be accessed using…