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

Add .extend to allow for extensions #24

Open
merlinstardust opened this issue Sep 20, 2017 · 3 comments
Open

Add .extend to allow for extensions #24

merlinstardust opened this issue Sep 20, 2017 · 3 comments

Comments

@merlinstardust
Copy link

Aphrodite has a .extend function as seen here, which allows devs to extend Aphrodite with various features (right now it's only selectorHandlers).

It would be great to be able to do this in react-with-styles as well.

@ljharb
Copy link
Collaborator

ljharb commented Sep 20, 2017

That's very aphrodite-specific; the goal of react-with-styles is to be interface-agnostic, which means all react-with-styles interfaces must have the same API.

If we add any feature - like .extend - to one interface, we'd have to be able to add it to all of them.

We could certainly make this package export a function that takes options that returns an interface - that might be one way to make it work.

@merlinstardust
Copy link
Author

That's reasonable to me. And I think that's important to do as react-with-styles becomes popular, there will be many interfaces with interface-specific features.

@ljharb
Copy link
Collaborator

ljharb commented Sep 20, 2017

That's why I'm concerned about adding this feature - we need to be limited to the lowest common denominator of what all interfaces support. That's much more important than any individual interface feature.

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

2 participants