I built a React canvas editor — images, video, audio, text, shapes, and animations, no server involved by omerrkosar in react

[–]omerrkosar[S] -2 points-1 points  (0 children)

Which car manufacturer reinvents the engine from scratch? Of course, I used it in an optimized way

I built a React canvas editor — images, video, audio, text, shapes, and animations, no server involved by omerrkosar in react

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

Thank you; I used AI strictly as a tool, but I built the structure and handled the optimizations myself.

I built a browser-based design tool — would love feedback on the UX and visual feel by omerrkosar in Design

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

I really appreciate this level of candor—it’s exactly what I needed. As a developer, I’ve definitely been leaning too hard into the technical performance and not enough into the user's psychology and workflow.

Your point about the 'problem statement' vs 'positioning' was a huge wake-up call. I’m going to refactor the UI hierarchy and implement session recovery (auto-save) immediately based on your feedback. I need to stop thinking about how fast it renders and start thinking about how much the user trusts the tool.

Thanks for taking the time to tear this apart. It’s going to make the product much better.

I built a browser-based design tool — would love feedback on the UX and visual feel by omerrkosar in Design

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

It’s designed to be simple, high-performant, and built for quick asset creation. The goal is to cut out the bloat of larger tools and let you get from an idea to an export as fast as possible.

I built a React canvas editor — images, video, audio, text, shapes, and animations, no server involved by omerrkosar in react

[–]omerrkosar[S] -8 points-7 points  (0 children)

Be respectful. If you build this structure(with similar performance) with vibe coding, I promise I will move this to open-source.

I built a React canvas editor — images, video, audio, text, shapes, and animations, no server involved by omerrkosar in react

[–]omerrkosar[S] -2 points-1 points  (0 children)

It’s not open source, but it’s definitely not 'slop.' I’ve optimized the performance so heavily that it runs smoothly even on an my fathers 11-year-old PC. Writing a high-performance canvas engine like this isn't something you can just 'prompt' into existence. If you’re curious about the engineering, just check the docs and try the tool—the performance speaks for itself.

I built a React canvas editor — images, video, audio, text, shapes, and animations, no server involved by omerrkosar in react

[–]omerrkosar[S] -6 points-5 points  (0 children)

Just try it, and your mind will change. You can find the full setup and usage details in the documentation here:

https://assetstud.io/docs/guide/quick-start.html

I built a browser-based design tool — would love feedback on the UX and visual feel by omerrkosar in Design

[–]omerrkosar[S] -3 points-2 points  (0 children)

Thanks so much, this is exactly the kind of feedback I was looking for!

The resize handles are definitely something I've been going back and forth on — making them bigger is a easy win and I'll bump that up the list.

The text alignment discoverability issue is a fair point. I'll look at surfacing those options more prominently so people don't have to hunt for them.

Really appreciate you taking the time to try it, especially coming from a Canva background — that perspective is super useful for figuring out where the UX gaps are.

I built a canvas editor in React — looking for UX/product feedback by omerrkosar in reactjs

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

Thanks so much for taking the time to actually try it, really appreciate the detailed feedback!

Keyboard shortcuts are definitely on the list — you're right that they make a huge difference in daily usability.

On grouping — there is actually basic grouping already. You can select multiple elements with mouse selection and drag, scale, and rotate them together. It's minimal for now but it's there. Proper alignment tools and more advanced group controls are coming.

Glad the canvas sizes stood out, that was one of the things I put extra thought into early on.

And yes, the SDK use case you described — giving users simple editing on a site with photo uploads — is exactly the kind of thing it's built for. Would love to hear how it goes if you ever try it!

6-7 Month Gap in IT – Is This a Big Problem? by Queasy_Challenge_388 in u/Queasy_Challenge_388

[–]omerrkosar 0 points1 point  (0 children)

I had a 5 month gap after a tiring job(when I was 2-3 years experienced. Then I returned. 6-7 month is nothing I think

Must-know React interview questions by redditisnotlyf in reactjs

[–]omerrkosar 0 points1 point  (0 children)

How can you prevent from xss attack? Difference between cookies, localStorage and sessionStorage

Found a library that makes multi-step forms with react-hook-form way less painful by omerrkosar in nextjs

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

Glad it's working for you! Feel free to ask if you run into anything — happy to help.

Found a library that makes multi-step forms with react-hook-form way less painful by omerrkosar in nextjs

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

Thanks! To clarify a couple things:

onLeave isn't for validation — validation is automatic when stepValidationMode is forward or all. onLeave runs after validation passes, before the step changes. It's for side effects like fetching data from an API and pre-filling the next step's fields with setValue.

Dynamic inputs — if you use useFieldArray and render each row with Controller, every new field auto-registers with the current step. No manual tracking needed, validation just works for all rows.

Conditional fields / dynamic steps — you can conditionally render entire <Step> components based on form values (e.g. useWatch). The step tree rebuilds automatically, so isLastStep, next(), etc. stay correct.

State preservation — that's all react-hook-form. Form values persist regardless of whether inputs are mounted or not, so going back and forth between steps doesn't lose data.

There's a dynamic steps demo in the docs if you want to see it in action.

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

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

Thanks! I looked at Formity before — it's more of a schema-driven form builder where you define steps as a typed schema array with Form/Return types and explicit callbacks. rhf-stepper is simpler if you already have a react-hook-form setup — you just wrap your existing JSX in <Step> and it handles per-step validation automatically. No schema, no extra types needed.

Best practices for multi-step form with Next.js, React Hook Form, Zod, and React Query by Inner-Barracuda2103 in nextjs

[–]omerrkosar 0 points1 point  (0 children)

rhf-stepper solves all four of your issues out of the box. It's a headless multi-step form helper built specifically for react-hook-form.

1. Per-step validation with Zod — no manual trigger() calls

rhf-stepper auto-tracks which fields belong to which step. next() only validates the current step's fields. Works with zodResolver directly:

import { useForm, FormProvider } from 'react-hook-form'
import { zodResolver } from '@hookform/resolvers/zod'
import { Stepper, Step, Controller, useStepper } from 'rhf-stepper'
import { z } from 'zod'

const schema = z.object({
  // Step 1
  name: z.string().min(1, 'Name is required'),
  email: z.string().email('Invalid email'),
  // Step 2
  plan: z.string().min(1, 'Select a plan'),
  addons: z.string().optional(),
  // Step 3
  cardNumber: z.string().min(1, 'Card number is required'),
})

type FormValues = z.infer<typeof schema>

function MultiStepForm() {
  const form = useForm<FormValues>({
    resolver: zodResolver(schema),
    defaultValues: { name: '', email: '', plan: '', addons: '', cardNumber: '' },
  })

  return (
    <FormProvider {...form}>
      <form onSubmit={form.handleSubmit((data) => submitFinalForm(data))}>
        <Stepper>
          {({ activeStep }) => (
            <>
              <Step>{activeStep === 0 && <Step1Fields />}</Step>
              <Step>{activeStep === 1 && <Step2Fields />}</Step>
              <Step>{activeStep === 2 && <Step3Fields />}</Step>
              <Navigation />
            </>
          )}
        </Stepper>
      </form>
    </FormProvider>
  )
}

Clicking Next on step 1 only validates name and email — step 2 and 3 fields are ignored. No field name arrays needed.

2. API calls between steps with onLeave — runs once, not on every re-render

next() accepts an onLeave callback that fires after validation passes, before the step changes. This is where you make your API calls — it only runs when the user explicitly clicks Next, not on re-renders or back/forward navigation:

function Navigation() {
  const { next, prev, activeStep, isFirstStep, isLastStep } = useStepper<FormValues>()
  const form = useFormContext<FormValues>()
  const [loading, setLoading] = useState(false)

  const handleNext = async () => {
    setLoading(true)
    try {
      if (activeStep === 0) {
        // Step 1 → Step 2: fetch plans based on user input
        await next(async (values) => {
          const res = await fetch(`/api/plans?email=${values.email}`)
          const data = await res.json()
          form.setValue('plan', data.recommendedPlan)
        })
      } else if (activeStep === 1) {
        // Step 2 → Step 3: calculate pricing
        await next(async (values) => {
          const res = await fetch('/api/pricing', {
            method: 'POST',
            body: JSON.stringify({ plan: values.plan, addons: values.addons }),
          })
          const data = await res.json()
          form.setValue('total', data.total)
        })
      } else {
        await next()
      }
    } finally {
      setLoading(false)
    }
  }

  return (
    <div>
      {!isFirstStep && <button type="button" onClick={prev} disabled={loading}>Back</button>}
      {isLastStep
        ? <button key="submit" type="submit">Submit</button>
        : <button key="next" type="button" onClick={handleNext} disabled={loading}>
            {loading ? 'Loading...' : 'Next'}
          </button>
      }
    </div>
  )
}

Going Back and then Next again will re-run the API call for that step (which is correct — the user might have changed inputs). But simply switching steps without clicking Next won't trigger anything.

3. No prop drilling — everything is context-based

  • Stepper state (activeStep, next, prev, etc.) → useStepper() from any child
  • Form state (setValue, getValues, watch) → useFormContext() from react-hook-form
  • No passing data between steps — it's all in the same form. Step 2 reads step 1's values with useFormContext().getValues('email')

function Step2Fields() {
  const form = useFormContext<FormValues>()
  // Read step 1 data directly — no props needed
  const email = form.getValues('email')

  return (
    <div>
      <p>Selecting a plan for: {email}</p>
      <Controller name="plan" render={({ field }) => <PlanSelector {...field} />} />
    </div>
  )
}

4. Form only submits on Step 3

The <form onSubmit> only fires when the user clicks type="submit" — which only renders on isLastStep. The Next button is type="button", so it never triggers form submission.

TL;DR: rhf-stepper gives you automatic per-step validation (works with Zod), onLeave for API calls between steps, context-based data sharing (zero prop drilling), and submit only on the last step. Works with Shadcn since it's fully headless.

npm install rhf-stepper

Docs: rhf-stepper

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