JSPM

react-native-shaking-text

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q51168F
  • License MIT

A Text component that shakes every time its content changes

Package Exports

  • react-native-shaking-text

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-shaking-text) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

<ShakingText />

Grab your user's attention by shaking a <Text> that has changed.

Install

$ yarn add react-native-shaking-text

Or, if you use NPM:

$ npm install --save react-native-shaking-text

Use

Use it like you would use a <Text> — no configuration required.

It will automatically detect when the content has changed, and shake the view.

import ShakingText from 'reactn-native-shaking-text';

export default class App extends React.Component {
  state = {
    word: 'Hey',
  };

  componentDidMount() {
    setTimeout(() => this.setState({ word: "Much attentive" }), 2000);
  }

  render() {
    return (
      <View>
        <ShakingText>
          {this.state.word}
        </ShakingText>
      </View>
    );
  }
}

License

MIT.