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

Could we export {Spring, Transition} from 'react-spring' instead of 'react-spring/renderprops'? #559

Closed
huchenme opened this issue Feb 20, 2019 · 4 comments
Labels
kind: request New feature or request that should be actioned
Milestone

Comments

@huchenme
Copy link

May I know what is the reason to scope {Spring, Transition} under react-spring/renderprops instead of react-spring?

There are still large usage of class components, if scope under react-spring/renderprops we could not continue using module field because Test fails in Jest, end up we have to use react-spring/renderprops.cjs, not only more ugly code, but also not able to tree shaking.

Can I suggest to export both useSpring and Spring under react-spring?

@drcmda
Copy link
Member

drcmda commented Feb 20, 2019

Eventually it will hopefully be like this, but as of right now hooks were a drastic change that didn't allow us to share code much, also would have chained the lib to React 16.8.x. Next major i hope that wrapping the classes around hooks will do. What sucks is that i allowed magic stuff like "auto" to creep into the api, and that will come back to haunt me since hooks don't lend to it any longer - therefore it can't probably be a clean wrap unless i throw out this feature - and that i'm not so sure i can do since there's no easy replacement as there is with hooks. Time will tell ...

@drcmda
Copy link
Member

drcmda commented Feb 21, 2019

#561

I don't yet know how to deal with regressions like auto. But that could be a way for now.

@aleclarson aleclarson added the kind: request New feature or request that should be actioned label Apr 1, 2019
@aleclarson
Copy link
Contributor

You can use v9 like this now: yarn add react-spring@next

Let us know how it goes: #642

@huchenme
Copy link
Author

Nice, thanks @aleclarson

@aleclarson aleclarson added this to the v9.0.0 milestone Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: request New feature or request that should be actioned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants