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

Drop defaultAttrs #328

Closed
tgvashworth opened this issue Jan 14, 2015 · 3 comments
Closed

Drop defaultAttrs #328

tgvashworth opened this issue Jan 14, 2015 · 3 comments
Milestone

Comments

@tgvashworth
Copy link
Contributor

API breaking change.

The interaction between attributes and defaultAttrs is unclear and open to hard-to-spot bugs, for example when a mixin uses the a different form to the component.

Support for defaultAttrs should be dropped, breaking the API and forcing everyone to move the attributes.

@tgvashworth tgvashworth added this to the 2.0.0 milestone Jan 14, 2015
@tgvashworth
Copy link
Contributor Author

Thinking this could be done by making attributes and defaultAttrs compatible (currently they're mutually exclusive).

@giuseppeg
Copy link
Contributor

Yeah we could have a flag on attributes say strictmode to disable the strict checks introduced by this method. In this way defaultAttrs would only be a proxy fn to attributes with strictmode: false

@tgvashworth
Copy link
Contributor Author

Enough time has passed for defaultAttrs to have been migrated away from, so the deprecation strategy will be:

  • release a 1.x that spits warnings (in debug mode) when defaultAttrs is used
  • make defaultAttrs a warning-spitting (regardless of debug mode) no-op in 2

We need to be this strict about it because the two are mutually exclusive, so projects like TweetDeck will have to do an all-at-once switch.

tgvashworth pushed a commit that referenced this issue Jan 29, 2015
- Throws when called
- Fix use of attributes in tests

Fix #328
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

2 participants