Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Read data in props.histroy.push in react component

import React from 'react';

const YourRoute = props=> {
    const { _id, name } = (props.location && props.location.state) || {};
        //_id and name will contain the passed data
     .
     .
     .

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Read #data #react #component
ADD COMMENT
Topic
Name
8+4 =