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

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

Open
RocketPuppy opened this issue Apr 23, 2020 · 0 comments
Open

Comments

@RocketPuppy
Copy link
Collaborator

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

    forgotPasswordEmail.enterText.one("[email protected]");
    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("[email protected]");
  forgotPasswordSubmit.submit.one();
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

No branches or pull requests

1 participant