'link postback in reactJS and dotnet core using ant design
We are building an application using React JS and dot net core and ant design. The developer instead of making links, he used
<p onClick={()=>dispatch(push("/"))}>home</p>
The reason provided is that this way page doesn't posts back, hence browsing between pages is much faster. I am not sure if this is a valid reason, I guess the right way might be:
<button type="link" onClick={()=>dispatch(push("/"))}>home</button>
OR
<a href="/">home</a>
Kindly advice what is the right way, since I am new to React and Ant Design. Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
