How to use the formula-one.arrayUtils function in formula-one

To help you get started, we’ve selected a few formula-one examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flexport / formula-one / example / src / App.tsx View on Github external
const App = () => {
  const formData = useF1(initialForm);
  const [addFriend, removeFriend] = arrayUtils(formData.friends, '');

  console.log(formData);

  return (
    <form>
      
      
      
      

      <section>
        {formData.friends.map((friend, i) =&gt; (
          <div>
            
            <button> {removeFriend(i)}}&gt;Remove Friend</button>
          </div></section></form>

formula-one

Strongly-typed React form state management

MIT
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis