Skip to content

Conversation

@97vack
Copy link
Contributor

@97vack 97vack commented Jul 21, 2025

1.6.2 (2025-07-21)

Bug Fixes

  • Fix the issue of setValue and setValues losing responsiveness for deep model assignment (f792a3c)

For Example

import { useForm } from 'react-form-simple';


export default function App() {
  const { render, setValues } = useForm({
    profile: { name: 'name', age: 18 },
  });

  const renderName = render('profile.name')(<input />);

  return (
    <>
      {renderName}
      <button
        onClick={() => {
          setValues({ profile: { ...model.profile, name: 'name' } }); // This method will have problems before 1.6.2
        }}
      >
        submit
      </button>
    </>
  );
}
import { useForm } from 'react-form-simple';


export default function App() {
  const { render, setValue } = useForm({
    profile: { name: 'name', age: 18 },
  });

  const renderName = render('profile.name')(<input />);

  return (
    <>
      {renderName}
      <button
        onClick={() => {
          setValue('profile', { ...model.profile, name: 'name' }); // This method will have problems before 1.6.2
        }}
      >
        submit
      </button>
    </>
  );
}

@97vack 97vack merged commit fc08220 into main Jul 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants