0

first History.push screen

enter image description here

[example code]

const { history } = this.props;
history.push({ pathname: 'workspace?task=14' });

Result URL

enter image description here

[example result]

Chrome URL => http://localhost3000/workspace?task=14

but ... If I send another request here...

next use History.push

enter image description here

[example code]

history.push('workspace?task=15');

next use History push result URL

enter image description here

[example result]

Chrome URL => http:// localhost3000/workspace?task=14?task=15

It overlaps...

No matter how hard I look, I can't find the results. Please help me.

Sylhare
  • 5,907
  • 8
  • 64
  • 80
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 02 '22 at 15:34

1 Answers1

0

I solved this problem simply. My basic skills are too lacking. In conclusion, the query string value should not be put in the patch name, but it was solved when it was put in the key search. I think I studied a lot. I worked hard for 4 hours with just this.

before

history.push({pathname: `workspace?task=14`});

after

history.push({pathname: `workspace` , search: `task=14`})