This particular article is my solution to try and mock a particular external method (using jest mock method) in the test case for a simple example app. Hope this article saves time for a lot of fellow devs in the community!
So React Portals are basically React’s way of rendering your desired component into a target dom element anywhere in your react application.
In my current company I am unit testing React components using jest and enzyme. While testing one of the functional components I came across a problem which needed a good solution/explanation and after some research on it I think I found the right way to do it and I wanted to share it with the community
React SSR with HMR is a Quick setup guide to quickly bootstrap your react project with helpful features like Server-side rendering and Hot Module Reload.
In one of my client’s projects, there was a situation where I wanted to update the alert message after a certain event but I was not aware of how to do it as it was not mentioned in the official ionic docs.
When the user enters the password, he/she should be able to see a bar which shows indicates the strength of the password entered in the field. Red color means it’s a weak password, Orange color means the password has medium strength and Green color means the password is strong enough!
Introduction Hello everyone, This React SSR article is for those developers who love control. Every project they work on, they […]
So you have a remote url of a PDF file which is being shown in your page content. When the user clicks on it, by normal behaviour it will try to open up in an external browser or an in-app browser (if you have one integrated in your app). What we want is that, when user clicks on the link, it will download the file in background and open the file swiftly in the device’s default pdf reader.
Creating components in react can be tricky for beginners. I have done some of my projects in react and the scope of some of those projects are small, so using external components library can make the project comparatively heavy.