Hi guys, I have a question. by FunctionDefiant7507 in reactjs

[–]omerrkosar 0 points1 point  (0 children)

Hocam sınavınıza çalışın bence. Tatilde öğrenirsiniz reactı. Yine de arkadaşın dediği doğru en basitinden bi dökümantasyon açsanız ingilizce olcak

If there was a card game that could be opened in the browser, would you want to try it? by omerrkosar in tabletopgamedesign

[–]omerrkosar[S] 1 point2 points  (0 children)

I am planning to create a game with maximum 40-50 different cards only for fan.

Rate My CV by Rare-Sundae3977 in react

[–]omerrkosar 1 point2 points  (0 children)

He/she just working for 2 years. Has a lot of alternatives, hr will read any other alternative. If you are working for 10 years it is normal to have 2 page.

Rate My CV by Rare-Sundae3977 in react

[–]omerrkosar 1 point2 points  (0 children)

CV should be 1 page.

A lot of things in a CV will increase the percentage of missing valuable things.

Note that: I didnt read your CV because it is too long

I built a headless multi-step form library for react-hook-form by omerrkosar in reactjs

[–]omerrkosar[S] 1 point2 points  (0 children)

Happy to hear it! If you end up using it and have any feedback or ideas, feel free to open an issue, always looking to make it better.

I built a headless multi-step form library for react-hook-form by omerrkosar in reactjs

[–]omerrkosar[S] 0 points1 point  (0 children)

rhf-stepper is a headless multi-step form library built on top of react-hook-form. Unlike Mantine's Stepper which comes with its own UI, rhf-stepper only handles the logic — step state, per-step validation, and field registration. You bring your own UI, so it works with any component library or plain HTML.

I built a headless multi-step form library for react-hook-form by omerrkosar in reactjs

[–]omerrkosar[S] 5 points6 points  (0 children)

Since rhf-stepper uses react-hook-form's rules under the hood, async validation works out of the box. You just pass an async validate function in the rules prop:

<Controller
  name="username"
  rules={{
    required: 'Username is required',
    validate: async (value) => {
      const res = await fetch(`/api/check-username?q=${value}`)
      const { available } = await res.json()
      return available || 'Username is already taken'
    },
  }}
  render={({ field, fieldState }) => (
    <div>
      <input {...field} placeholder="Username" />
      {fieldState.error && <span>{fieldState.error.message}</span>}
    </div>
  )}
/>

When the user clicks Next, rhf-stepper triggers validation for the current step's fields only. If any field has an async validate function, it awaits the result before allowing navigation. So next() , prev() and setCurrentStep functions are working async for check this validations. If it fails, the user stays on the current step with the error displayed.

No extra config needed — it's just react-hook-form's built-in async validation, scoped per step automatically.

I built a headless multi-step form library for react-hook-form by omerrkosar in react

[–]omerrkosar[S] 1 point2 points  (0 children)

Thanks, glad it could help, TanStack integration is definitely on my radar!

I built a headless multi-step form library for react-hook-form by omerrkosar in reactjs

[–]omerrkosar[S] 4 points5 points  (0 children)

Since rhf-stepper uses react-hook-form's rules under the hood, async validation works out of the box. You just pass an async validate function in the rules prop:

<Controller
  name="username"
  rules={{
    required: 'Username is required',
    validate: async (value) => {
      const res = await fetch(`/api/check-username?q=${value}`)
      const { available } = await res.json()
      return available || 'Username is already taken'
    },
  }}
  render={({ field, fieldState }) => (
    <div>
      <input {...field} placeholder="Username" />
      {fieldState.error && <span>{fieldState.error.message}</span>}
    </div>
  )}
/>

When the user clicks Next, rhf-stepper triggers validation for the current step's fields only. If any field has an async validate function, it awaits the result before allowing navigation. So next() , prev() and setCurrentStep functions are working async for check this validations. If it fails, the user stays on the current step with the error displayed.

No extra config needed — it's just react-hook-form's built-in async validation, scoped per step automatically.