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

Remove data related props from the component's props #242

Open
dariocravero opened this issue May 14, 2021 · 1 comment
Open

Remove data related props from the component's props #242

dariocravero opened this issue May 14, 2021 · 1 comment

Comments

@dariocravero
Copy link

When we have a view that uses data, some of the args land on the props even though they shouldn't because they're local.
They're:

isValid,
isInvalid,
isSubmitting,
onSubmit,
onChange

Not a blocker at all but it'd be nice if eventually we could not render them into the file.

Eg:

Auth View
is together
  Text
  letterSpacing 1.5
  data stuff
  format stuff
  text <value
  Text
  data stuff
  format tey
  validate test
  isVVVV <isValid
  isInvaliddd <isInvalid
  text <value
  isSubmitting <
  onSubttttt <onSubmit
  onClick <onSubmit
  onChange <onChange

Outputs:

export default function Auth({
  children,
  'data-testid': dataTestid,
  'data-view-path': dataViewPath,
  viewPath= "/App/Auth",
isValid,
isInvalid,
isSubmitting,
onSubmit,
onChange
}) {
@dariocravero
Copy link
Author

Could be done by either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant