I would expect the effect to log the current value of the text whenever it changes, but it only runs for the initial value. Why?
class RecordForm extends HookWidget {
final Record? record;
const RecordForm({
Key? key,
this.record,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final initialTitle = record != null ? record!.title : "";
final _title = useTextEditingController
.fromValue(TextEditingValue(text: initialTitle));
useEffect((){
log.wtf(_title.value.text);
}, [_title.value]);
return // ...
TextFormField(
controller: _title,
// ...
),
// ...
;
}
}