Open alexander-dubinski opened 5 years ago
Duly noted. However, the HTML that was dictated in the project included the a-tag. https://s3.amazonaws.com/codecademy-content/programs/react/jammming/components-html-css/searchbar/searchbarhtml.txt Furthermore, the provided CSS supports the a-tag, but not a button. https://s3.amazonaws.com/codecademy-content/programs/react/jammming/components-html-css/searchbar/searchbarCss.txt
https://github.com/Meiczyslaw/bwa-u3-jammming-prj/blob/31f6bd19de27ba550e0cd9496e241f4d7c079d49/src/components/SearchBar/SearchBar.js#L27
In this case, a
<button></button>
tag should be used, As a best practice,<a>
tags should only be used for links. Furthermore, if you wrap the input and button in a<form>
tag and set an attribute on the buttontype="submit"
, search will be initiated when the user presses enter.