@mukwende2000
Posted
Yes it makes the code look dirty but that is the disadvantage, however the advantages outweigh them, you prefer regular css because these are small project, when you begin working large stuff, css will become so complex that you will understand why there are frameworks in the first place. That is why frameworks are not for small projects, regular css and js is just enough for these, the benefits of frameworks show when you begin doing some real world stuff.
Marked as helpful
@ify47
Posted
@mukwende2000 i understand, thanks for the response, and how do you see my useState implementation with the rating component, was it alright?
@mukwende2000
Posted
@ify47 the useState is just fine although i can't see the usage of rateNumber state in the Rate component, it is being used in the ThankYou components, so am not sure why you are passing it there. Also the getNumber function is kinda confusing, you have defined it with a parameter but calling it without one. Apart from the react stuff, i will encourage you to continue adding onto your html knowledge because it seems there is much lacking, all the inputs are supposed to be in a form tag, and they are supposed to be of type 'checkbox' not text.
@ify47
Posted
@mukwende2000 i am getting the users rating number passed as a child to parent component, hence the childname, once the submit is clicked, it triggers the getRatevalue and gets the inputs value through childname Const handlesubmit =()=>{ rateNumber(inputs) }
Getratenumber is being passed to ratenumber and the inputs in bracket is being passed back to the parent component(app.js)
, and sets the class action to false aswell, what do you mean by getNumber function, or are you referring to getRateValue, which i just explained, i dont know the code you're looking at because all the 5 inputs i added in ratingpage is radio type and i connected it to the label making using the htmlfor, thus making me able to hide the radio checkboxes
@mukwende2000
Posted
@ify47 oh yes i see now, and my bad somehow i saw text somewhere, that is okay then, and great solution overall.... just put all the inputs in a form to make it the right structure.
Marked as helpful