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

Connect typing improvements #695

Merged

Conversation

@sgrishchenko
Copy link
Contributor

commented Mar 27, 2019

Description

This pull request contains a set of connect typing improvements:

  • theme injected automaticalliy into component
  • Rules type improved
  • supported Reconnection Pattern in typings
  • included renderer argument to TRule and TMultiRule (see #625)
  • updated typescript example

Example

before:

import {connect, withTheme} from 'react-fela'

const MyComponent = ({styles, theme}) => {/* some content */}

const ConnectedMyComponent = connect({/* some rules */})(
  withTheme(MyComponent)
)

after:

import {connect} from 'react-fela'

const MyComponent = ({styles, theme}) => {/* some content */}

const ConnectedMyComponent = connect({/* some rules */})(MyComponent)

Packages

List all packages that have been changed.

  • fela-bindings
  • react-fela
  • preact-fela
  • inferno-fela

Versioning

Minor

Checklist

Quality Assurance

You can also run yarn run check to run all 4 commands at once.

  • The code was formatted using Prettier (yarn run format)
  • The code has no linting errors (yarn run lint)
  • All tests are passing (yarn run test)
  • There are no flow-type errors (yarn run flow)

Changes

If one of the following checks doesn't make sense due to the type of PR, just check them.

  • Tests have been added/updated
  • Documentation has been added/updated
  • My changes have proper flow-types
@robinweser robinweser merged commit 212faff into robinweser:master Apr 4, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@robinweser

This comment has been minimized.

Copy link
Owner

commented Apr 4, 2019

Nice! Thanks for the work :)

@robinweser

This comment has been minimized.

Copy link
Owner

commented Apr 4, 2019

@sgrishchenko Does this also solve #625?

@sgrishchenko

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

I think yes, this solve #625 main issue topic, but now I read the issue carefully and saw that there were problems with keyframe typing. I think I will make an additional pull request in the near future to close this issue.

@robinweser

This comment has been minimized.

Copy link
Owner

commented Apr 5, 2019

Ok great! Thank you. I will release this stuff hopefully today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.