skip to Main Content

Not sure if i'm using oop in javascript correctly

Im learning OOP and decided to create a project using it. I feel like I'm not sure if I'm using it correctly. const btnCalculate = document.getElementById('work'); const spanOne = document.querySelector('.first'); const spanTwo = document.querySelector('.second'); class PayDay{ constructor(hours, payRate){ this.hours =…

VIEW QUESTION

Reactjs – React rerendering

I have component const ComponentA: React.FC<ComponentAProps> = (props) => { const [invalidFields, setInvalidFields] = React.useState([]); return ( <ComponentB invalidInputs = {inavlidFields.length !== 0} /> ) Does component B rerender when the state invalidFields changes?

VIEW QUESTION
Back To Top
Search