quantum
quantum copied to clipboard
Dynamic input value only being respected on first render.
When I have a dinamic input value like this:
<Input value={text} />
The input initial value will respect text
variable, but if text
change, the input value won't change accordingly.
Example:
import { Input } from '@catho/quantum';
import { useState } from 'react';
const Test = () => {
const [text, setText] = useState('Initial text');
const clickHandler = () => {
setText('Another text');
};
return (
<>
<h1>{text}</h1>
<button type="button" onClick={clickHandler}>My Button</button>
<Input type="text" value={text} />
</>
);
};
export default Test;
Hi there! Here is me, again. 😄 Can I get this one, now?! I think I know what is happening here.
Hi there! Here is me, again. smile Can I get this one, now?! I think I know what is happening here.
just do it @alisson-suzigan! :smile:
This issue was resolved by @alisson-suzigan PR. Thanks!! :1st_place_medal:
Problem still persists on ẗhis date
Boa rapha! 🙌