Creating React component vs using CSS styling
Creating React component vs using CSS styling I have created a tab menu using CSS styling that I use in several different spots in my ReactJS app. .tab { overflow: hidden; border: 1px solid #ccc; background-color: #f1f1f1; margin: 0; padding: 0; } .tab button { background-color: inherit; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; transition: 0.3s; } .tab button:hover { background-color: #ddd; } .tab button:disabled { background-color: #ccc; cursor: default; } .tabcontent { display: none; padding: 6px 12px; border: 1px solid #ccc; border-top:none; } This is in a index.css file that sits with all my .js files. Within my React code I use it like this, as an example: index.css .js <table><tbody> <tr className="tab"><td> <button onClick={() => this.openTab(0)}>Tab 1</button> <button onClick={() => this.op...