Skip to content

A React Native component to shake child componets wrapped around it. Usually used to show error state. Created using reanimated

License

Notifications You must be signed in to change notification settings

rvibit/react-native-shake-reanimated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

react-native-shake-reanimated

A React Native component to shake child componets wrapped around it. Usually used to show error state. Created using react-native-reanimated

Usage

Copy paste the file in your components folder or wherever you want.

import { Shake, type ShakeRef } from 'Shake'; //import from location

const textRef = React.createRef<ShakeRef>();

const onSubmit = (data) => {
  //validation
  if(data.text === ''){
    textRef.current.shake();
  }
};

<Shake ref={textRef}>
  <Text>Hello World</Text>
</Shake>

About

A React Native component to shake child componets wrapped around it. Usually used to show error state. Created using reanimated

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published