[英]Button Vs Links in a SPA such as React
Which one should I use inside a SPA application??我应该在 SPA 应用程序中使用哪个? Considering the user Experience.
考虑用户体验。
I have designed my applications using React with some personal rules, but which one would be the right way to use?我使用 React 设计了一些个人规则的应用程序,但哪一种是正确的使用方式?
Buttons:按钮:
Links链接
Like I said, getting confuse here to distinguish the use and purpose of each one.就像我说的,在这里混淆以区分每个的用途和目的。
Generally, my distinguishing factor is that Buttons execute an action whereas Links navigate you to a different portion of a website, generally undoable with the back button.通常,我的区别因素是按钮执行操作,而链接将您导航到网站的不同部分,通常可以使用后退按钮撤消。
Some common Buttons:一些常见的按钮:
Some Common Links:一些常见的链接:
As a metric for which to use, I usually like to ask if the thing I'm doing would be able to be undone with the back button on the browser.作为要使用的指标,我通常喜欢问我正在做的事情是否可以通过浏览器上的后退按钮撤消。 You can't "back button" a login request, or a tweet, but you can "back button" navigation to your profile on facebook or a link on reddit.
您不能“返回按钮”登录请求或推文,但您可以“返回按钮”导航到您在 facebook 上的个人资料或 reddit 上的链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.