Skip to content

Utility to clean up repeated materialize calls on lots of views #34

@RocketPuppy

Description

@RocketPuppy
    const forgotPasswordForm = ForgotPasswordForm.materialize(app);
    const forgotPasswordEmail = ForgotPasswordForm(EmailInput).materialize(app);
    const forgotPasswordSubmit = ForgotPasswordSubmit.materialize(app);

    forgotPasswordEmail.enterText.one("foo@bar.com");
    forgotPasswordSubmit.submit.one();

Code like this is repetitive and adds significantly to the signal-noise ratio. It would be nice to have some utility to clean this up. Maybe something like this:

  const {
    forgotPasswordForm,
    forgotPasswordEmail,
    forgotPasswordSubmit
  } = materializeAll(app, viewSpec);

  forgotPasswordEmail.enterText.one("foo@bar.com");
  forgotPasswordSubmit.submit.one();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions