Skip to content

Support for non-boolean classNameBinding#2

Description

@Turbo87

Using classNameBindings: ['foo'] is ambiguous and depends on the runtime value of the foo property.

  • foo: 'BarBaz' will cause class="bar-baz"
  • foo: true will cause class="foo"
  • foo: false will cause class=""
  • foo: '' 馃し鈥嶁檪

We will need to decide what we want to do about this. Currently the codemod skips components that use this pattern.

Alternatives:

  • Introduce a helper that resolves this issue at runtime.
  • Use an interactive prompt each time this pattern is encountered and ask the user if this ia s boolean or string property.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions