Skip to content

небольшие комментарии #59

Description

@atherdon
  1. можем ли мы вынести этот большой объект outside - мне просто ненравится когда внутри компонента все лежит.
    https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L14

пример из туториала который я нашел

const LoginSchema = Yup.object().shape({
  email: Yup.string()
    .email("Invalid email address format")
    .required("Email is required"),
  password: Yup.string()
    .min(3, "Password must be 3 characters at minimum")
    .required("Password is required")
});

<Formik
              initialValues={{ email: "", password: "" }}
              validationSchema={LoginSchema}
  1. сделать отдельным компонентом. можем ли мы заюзать компонент, который мы делали в sendgrid-forms? https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L53

  2. использовать email component для обоих форм

  3. вынести чекбоксы в отдельные файлы. я хочу потом эти checkboxes re-use
    https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L86
    https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L92
    https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L98
    https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L104
    https://github.com/atherdon/subscribe-form/blob/master/components/forms/subscribe.js#L110

сс @coder-do

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions