Conversation
CheezItMan
left a comment
There was a problem hiding this comment.
You have the basic event listeners for the buttons working with a few minor errors. It looks like you didn't have time to get the other features done.
For now I suggest focusing on React material and if you have time during a break week reviewing managing plain JS event handling.
🔴
| gap: 15px; | ||
| height: 100vh; | ||
| width: 100vw; | ||
| grid-template-columns: (2, 1fr); |
There was a problem hiding this comment.
No () and no commas here.
| grid-template-columns: (2, 1fr); | |
| grid-template-columns: 2 1fr; |
| height: 100vh; | ||
| width: 100vw; | ||
| grid-template-columns: (2, 1fr); | ||
| grid-template-rows: (4, 1fr); |
There was a problem hiding this comment.
| grid-template-rows: (4, 1fr); | |
| grid-template-rows: 4 1fr; |
| background: transparent; | ||
| border: none; | ||
| display: flex; | ||
| align-items: vertical; |
| <button id="increment">⬆️</button> | ||
| <button id="decrement">⬇️</button> | ||
|
|
||
| <temperature id="temp"> |
There was a problem hiding this comment.
temperature isn't a valid html element type?
Instead maybe make it a section and then give it the class temperature
| <div class="garden"><h2>Garden</h2></div> | ||
|
|
||
| </div> | ||
| </div> |
There was a problem hiding this comment.
Extra end div tag
| </div> |
| textHolder.innerHTML = state.count; | ||
|
|
||
| tempUp.addEventListener("click", function() { | ||
| textHolder.innerHTML = ++state.count; |
There was a problem hiding this comment.
Just suggested indentation. This works except that you have a temperature tag in the HTML doc which isn't valid HTML.
| textHolder.innerHTML = ++state.count; | |
| textHolder.innerHTML = ++state.count; |
| // : 'black'; | ||
| // }; | ||
|
|
||
| tempCounter() |
There was a problem hiding this comment.
This works, but it's best practice to put it in an event handler like this to prevent it from being called before the HTML doc finishes loading.
| tempCounter() | |
| document.addEventListener('DOMContentLoaded', tempCounter); |
yikes