• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Enable Disable input with button in reactJS / nextJS

Resolved: Enable Disable input with button in reactJS / nextJS

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have a condition like this. I want to enable text input if the button is pressed and can edit the text in it. the question is how to make the function in react js?
enter image description here
my Code:

Answer:

Use useState hook and onClick event like in this example.

If you have better answer, please add a comment about this, thank you!

next.js reactjs
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to resolve LNK2001 in c++ projects

26/03/2023

Resolved: How to correctly initialize vector of number in Typescript

26/03/2023

Resolved: mysql calculating to get profit or loss from 2 tables ( Purchases and Sales) in FIFO mode

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.