Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to react-hook-form instead of custom form library #78

Merged
merged 8 commits into from
Sep 8, 2021

Conversation

jdorn
Copy link
Member

@jdorn jdorn commented Sep 6, 2021

Our custom useForm hook has some major issues - it doesn't work well for number inputs (#74 ), has no validation logic built-in, and causes way too many React re-renders. Instead of fix these problems, we are switching to the popular react-hook-form which has already solved all of these issues and is actively maintained.

TODO:

  • Update front-end README
  • Unified <Field> component

Forms to convert:

  • Auth
  • ChangePasswordModal
  • CreateOrganization
  • InitialOrgSettings
  • Welcome
  • DimensionForm
  • EditDataSourceForm
  • EditInfoForm
  • EditMetricsForm
  • EditTagsForm
  • EditTargetingForm
  • InstructionsModal
  • ManualSnapshotForm
  • NewExperimentForm
  • NewPhaseForm
  • StopExperimentForm
  • InlineForm (along with IdeaPage and MetricPage)
  • IdeaForm
  • ImpactModal
  • ImpactSummary
  • TopNav
  • MetricForm
  • SegmentForm
  • ApiKeysModal
  • EditOrganizationForm
  • InviteModal
  • WebhooksModal
  • ShareModal
  • EditorPage
  • GeneralSettingsPage

@vercel
Copy link

vercel bot commented Sep 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

app – ./packages/front-end/

🔍 Inspect: https://vercel.com/growthbook/app/Fns2MtqK77xyHEbShisBduVUcAzV
✅ Preview: https://app-git-react-hook-form-growthbook.vercel.app

docs – ./packages/docs

🔍 Inspect: https://vercel.com/growthbook/docs/J2L7A3CCgdDMnakwFtd4ZRtcqdMA
✅ Preview: https://docs-git-react-hook-form-growthbook.vercel.app

[Deployment for bc857b3 canceled]

@jdorn jdorn linked an issue Sep 6, 2021 that may be closed by this pull request
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.

Bug: Number inputs in forms remove trailing zeros while typing
1 participant