I am beginner to reactjs. need to know how to send the props values in one page to another page. Props are on the first page I can get the class component value how to get the values in another page. Thanks in advance
wallcolor.jsx
import React, { Component } from "react";
import { SketchPicker } from 'react-color';
import WallFactory from "../../wall-factory-3d";
export default class WallColor extends Component {
constructor(props) {
super(props);
this.state = {
background: '#d3d3d3',
};
}
handleChangeComplete(e){
this.setState({ background: e.hex },()=>{
return <WallFactory background={this.state.background}/>
});
};
render() {
return (
<SketchPicker color={ this.state.background } onChangeComplete={(e)=>this.handleChangeComplete(e)} />
);
}
}
Another page is wall-factory-3d.js
import { handleChangeComplete } from "../../components/toolbar/wallcolor";
import * as SharedStyle from '../../shared-style';
function get_color(props){
console.log(props.background);
}
I tried this but not get output.