Results for the following term searched: react

More Stories

Cover Image for Nested routes with react router v4 / v5

Nested routes with react router v4 / v5

updated a few hours ago
javascript

# šŸ“ 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

Matheus Mello
Matheus Mello
Cover Image for How can I communicate between related react components?

How can I communicate between related react components?

updated a few hours ago
javascript

# 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

Matheus Mello
Matheus Mello
Cover Image for React this.setState is not a function

React this.setState is not a function

updated a few hours ago
javascript

# 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

Matheus Mello
Matheus Mello
Cover Image for How do you test for the non-existence of an element using jest and react-testing-library?

How do you test for the non-existence of an element using jest and react-testing-library?

updated a few hours ago
javascript

# āœØ 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

Matheus Mello
Matheus Mello
Cover Image for react-router - pass props to handler component

react-router - pass props to handler component

updated a few hours ago
javascriptproperties

# How to Pass Props to a Handler Component in React Router Are you stuck trying to pass props to a handler component in React Router? šŸ¤” Don't worry, you're not alone! Many developers struggle with this common issue. In this blog post, we will explore dif

Matheus Mello
Matheus Mello
Cover Image for How to compare oldValues and newValues on React Hooks useEffect?

How to compare oldValues and newValues on React Hooks useEffect?

updated a few hours ago

## How to Compare oldValues and newValues on React Hooks useEffect? šŸ¤” Have you ever wondered if there's a way to compare `oldValues` and `newValues` in `useEffect` on React Hooks, just like in the good old `componentDidUpdate` days? šŸ‘‰ Well, you're in

Matheus Mello
Matheus Mello
Cover Image for How to use `setState` callback on react hooks

How to use `setState` callback on react hooks

updated a few hours ago

# How to Use `setState` Callback on React Hooks šŸ’”šŸ”—šŸŽ£ React hooks have revolutionized the way we manage state in functional components. The introduction of the `useState` hook allows us to easily set and update our component's state. However, if you're c

Matheus Mello
Matheus Mello
Cover Image for Programmatically navigate using react router V4

Programmatically navigate using react router V4

updated a few hours ago
ecmascript-6

# Programmatically navigate using React Router V4: A Complete Guide šŸ”— React Router is a popular routing library for React applications, providing a way to navigate between different pages or URL endpoints. In version 4 of React Router, there are some cha

Matheus Mello
Matheus Mello
Cover Image for When to use ES6 class based React components vs. functional ES6 React components?

When to use ES6 class based React components vs. functional ES6 React components?

updated a few hours ago
ecmascript-6javascript

# When to use ES6 class based React components vs. functional ES6 React components? <p>React offers two main paradigms for creating components: ES6 class based components and functional ES6 components. Understanding when to use each one is key to writing

Matheus Mello
Matheus Mello
Cover Image for How to pass params with history.push/Link/Redirect in react-router v4?

How to pass params with history.push/Link/Redirect in react-router v4?

updated a few hours ago

## šŸš€ How to Pass Params with history.push/Link/Redirect in React-Router v4? Are you struggling to pass parameters with `history.push`, `Link`, or `Redirect` in React-Router v4? Don't worry, you're not alone! Many developers face this issue when working

Matheus Mello
Matheus Mello