logo
Search
showing results for - "read data in props histroy push in react component"
Eren
03 Sep 2016
1history.push({pathname:"/yourroute",state: {_id: "0001", name: "AZ"}})
2
source
Mariana
12 Apr 2020
1import React from 'react';
2
3const YourRoute = props=> {
4    const { _id, name } = (props.location && props.location.state) || {};
5        //_id and name will contain the passed data
6     .
7     .
8     .
9
10}
11
source
similar questions
pass data to component reacthow to pass props in reactpass props in reactnavigation react pass propshow do you pass props between componentsreact passing state as propsreact js usehistory push and pass propssend props from one component to another on button clickreact pass prop to parentpassing data in route reactpassing data in react router history 2cpushcan i pass function as prop on route changethis props history location pushhow to pass a prop in routehow to pass value from one component to another in react nativeprops historyreact router history push parameterhow to use history push within function component with parameters 3froute pass props to componentreact store props in statehow to pass a component as a prop in react
queries leading to this page
read data in props histroy push in react componentput props in component with histury pushwrite data in props histroy push in react componentread data in props histroy push in react component
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue