1. URL 방식으로 파라미터 전달

 

보내는 쪽에선

url = 'buy.js?order=' + JSON.stringify(order) 로 보내고

 

받는 쪽에선  

const params = new URLSearchParams(this.props.location.search);
const order = JSON.parse(params.get('order'));

 

 

2. push 방식으로 파라미터 전달

 

this.props.history.push('/joinComplete?name='+state.name+'&email='+state.email)

받는 쪽은 동일.

Posted by yongary
,