Skip to content

Instantly share code, notes, and snippets.

View khalid32's full-sized avatar
🤩
enthusiastic

Khalid Syfullah Zaman khalid32

🤩
enthusiastic
View GitHub Profile
import React from 'react';
import {Image, StyleSheet, TouchableOpacity, Dimensions, View, Animated, PanResponder, Text} from 'react-native';
import { Constants, BlurView } from 'expo';
class ReachNavigationDemo extends React.Component {
state = { isClosed: true, scroll: new Animated.Value(0) }
position = 0;
panResponder = PanResponder.create({
onMoveShouldSetResponderCapture: () => true,
onMoveShouldSetPanResponderCapture: (_, { dy }) => Math.abs(dy) > 0.5,
@shukerullah
shukerullah / VSCodeSettings.md
Last active October 4, 2023 15:10
Visual Studio Code settings for React Native

React Native VSCode Settings

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, Mac OSX, and Windows.

This module will install visual studio code essential extensions and settings for react-native.

Run react-native-vscode-settings

npx react-native-vscode-settings

I’m looking forward to the Sass Fundamentals workshop! A few notes to ensure you’re set up in advance are below.

See you soon!

Mike

Node.js

You’ll need a relatively recent version (v4.5 or newer, v7 ideally) of node.js installed. On OS X, a great way of doing this without disturbing your existing dev environment is to install NVM. Installation instructions are here.

@1Marc
1Marc / debugging-js-setup.md
Last active June 21, 2023 09:27
Debugging JavaScript LIVE -- Setup Instructions
  • Make sure you have a GitHub account
  • Install:
    • Git
    • Text editor (Atom or VSCode suggested)
    • Node installed and available via command line node. Recommended version 4.6 or greater.
    • Chrome web browser (latest stable release)
  • Clone the getRANTR repo and follow the install instructions.

React && Firebase Workshop

Contact Information

Prequisite Setup

  • A recent version of Node.js
  • npm install -g create-react-app
@teameh
teameh / PanResponder_Overview.js
Last active October 21, 2023 05:28
React native PanResponder interface overview
this._panResponder = PanResponder.create({
// ----------- NEGOTIATION:
// A view can become the touch responder by implementing the correct negotiation methods.
// Should child views be prevented from becoming responder on first touch?
onStartShouldSetPanResponderCapture: (evt, gestureState) => () => {
console.info('onStartShouldSetPanResponderCapture');
return true;
},
@Hyra
Hyra / add-panresponder.js
Last active February 6, 2020 19:10
Getting started with the PanResponder in React Native
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
Image, // we want to use an image
PanResponder, // we want to bring in the PanResponder system
Animated // we wil be using animated value
} from 'react-native';
@dabit3
dabit3 / React Native Easings
Created August 1, 2016 03:38
React Native Easing animations
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
Easing,
Animated,
@jarretmoses
jarretmoses / React Native Clear Cache
Last active November 12, 2024 12:12
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@mmloveaa
mmloveaa / Find the next perfect square
Last active February 3, 2024 07:36
Find the next perfect square
// 12/22/2015
// You might know some pretty large perfect squares. But what about the NEXT one?
// Complete the findNextSquare method that finds the next integral perfect square after the one passed as a parameter. Recall that
an integral perfect square is an integer n such that sqrt(n) is also an integer.
// If the parameter is itself not a perfect square, than -1 should be returned. You may assume the parameter is positive.
// Examples:
// findNextSquare(121) --> returns 144
// findNextSquare(625) --> returns 676