How to use the react-native-redash.contains function in react-native-redash

To help you get started, we’ve selected a few react-native-redash examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rainbow-me / rainbow / src / components / value-chart / ValueChart.js View on Github external
>
            
          
        )}
         0}
        />
         {
                  this._text.updateValue(
                    this.state.currentData[this.state.currentData.length - 1]
                      .value
                  );
                }),
              ]),
              onChange(
                this.touchX,
                call([this.touchX], ([x]) => {
                  let curX = 0;
                  if (x < (width / (amountOfPathPoints + 20)) * 10) {
                    curX = 0;
                  } else if (
github wcandillon / can-it-be-done-in-react-native / the-5-min / src / components / TapHandler.tsx View on Github external
export default ({ onPress, children, value }: TapHandlerProps) => {
  const shouldSpring = new Value(0);
  const state = new Value(UNDETERMINED);
  const gestureHandler = onGestureEvent({ state });
  useCode(
    block([
      cond(eq(state, BEGAN), set(shouldSpring, 1)),
      cond(contains([FAILED, CANCELLED], state), set(shouldSpring, 0)),
      onChange(state, cond(eq(state, END), call([], onPress))),
      cond(eq(state, END), [delay(set(shouldSpring, 0), duration)]),
      cond(
        and(eq(shouldSpring, 1), neq(value, 1)),
        set(
          value,
          timing({
            from: value,
            to: 1,
            easing,
            duration
          })
        )
      ),
      cond(
        and(eq(shouldSpring, 0), neq(value, 0)),