Blog
Page 767 of my articles, tutorials, and thoughts
Latest Articles
Invalid Host Header when ngrok tries to connect to React dev server
# Title: "🚧 Troubleshooting: Invalid Host Header when ngrok connects to React dev server 🚧" --- ### Introduction So, you're excited to test your awesome React application on a mobile device, but the moment you try to connect ngrok to the React dev ser
Push method in React Hooks (useState)?
# Understanding the Push Method in React Hooks (useState) 🔍 Are you confused about how to push an element inside an array when using the `useState` hook in React? 🤔 Don't worry! I'm here to guide you through it and provide easy solutions. Let's dive in!
Get viewport/window height in ReactJS
# 📱 How to Get Viewport/Window Height in ReactJS Have you ever wondered how to get the viewport height in ReactJS? 🤔 It's a common question, especially when you want to dynamically adjust the layout or elements based on the available space. In this blog
React PropTypes: Allow different types of PropTypes for one prop
# React PropTypes: Allow Different Types of PropTypes for One Prop 😎🔤💯 So, you have a React component that receives a prop called `size`. And you're wondering, can you let `React.PropTypes` know that this prop can be either a string or a number? 🤔 We
Nested routes with react router v4 / v5
# 📝 Easy peasy way to nest routes in React Router v4/v5 So you're working on a React app, and you want to organize your routes by nesting them. You've checked out the React Router v4 documentation, but you can't seem to get it working the way you want. D
How can I communicate between related react components?
# How to Communicate Between Related React Components? 🗣️ So, you're diving into the amazing world of ReactJS and you've encountered a common challenge - how do you make related components interact with each other?! 😱 Fear not, my fellow React enthusia
to call onChange event after pressing Enter key
# Calling the onChange Event after pressing Enter Key in React So, you're new to Bootstrap and React and you're facing an issue where the onChange event is triggered as soon as you enter just one digit in the input field. This post will guide you through
React this.setState is not a function
# Fixing the "this.setState is not a function" error in React If you're working with React and have encountered the error "TypeError: this.setState is not a function", you're not alone! This common issue often occurs when there is a problem with the bindi
How do you test for the non-existence of an element using jest and react-testing-library?
# ✨ Testing the Non-Existence of an Element in React with Jest and react-testing-library ✨ So you're writing unit tests for your component library using Jest and react-testing-library. 👩💻 Fantastic! But wait, there's a little challenge you've encounter






