chenglou / chenglou/react-motion

Add section to the README about generic usage of interpolated value

Open
#494 0 comments 0 reactions 0 assignees View on GitHub
docs help wanted
Dominant language
JavaScript
Stars
21.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Put is somewhere at the top.

Make sure it is clear that `styles` prop is not working with, well, actually styles, but gives you ability to use value to derive all other values of your styles.

See https://github.com/chenglou/react-motion/issues/304#issuecomment-331750756

> React motion does not operate "style" (I agree that is a misleading name for prop). It only applies function over any number you pass. This way it can stay minimal and you have all power to interpolate any number-related values.

```jsx

{({whatever}) => (


Hey, I'm transitioning color!

)}

```

Related:
- https://github.com/chenglou/react-motion/issues/394#issuecomment-262631976
- https://github.com/chenglou/react-motion/issues/291
- See https://github.com/chenglou/react-motion/issues/304
- ... some other closed or maybe opened issues

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the README and review the linked discussion about the styles prop and generic interpolation. Add a section near the top explaining that styles carries values used to derive actual styles, including the provided color-transition example. Done means the README clearly communicates this usage without implying that styles itself accepts CSS styles.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.