Skip to content

Instantly share code, notes, and snippets.

View MacKentoch's full-sized avatar
👨‍💻

Erwan DATIN MacKentoch

👨‍💻
  • France
View GitHub Profile
@MacKentoch
MacKentoch / README.md
Created August 5, 2016 19:07 — forked from boopathi/README.md
Creating a Swift-ReactNative project

Settings

  1. Create a project in XCode with the default settings
    • iOS > Application > Single View Application
    • Language: Swift
  2. Under project General settings, add ReactKit to Linked Framework and Libraries
    • + > Add Other... and choose /path/to/react-native/ReactKit/ReactKit.xcodeproj
  3. Now ReactKit would have been imported. Link it by choosing it from the list.
    • + > lib.ReactKit.a
  4. Under project Build Settings,
@MacKentoch
MacKentoch / AndroidManifest.xml
Created September 10, 2016 04:59 — forked from BrandonSmith/AndroidManifest.xml
Quick example of how to schedule a notification in the future using AlarmManager
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
import React, {
Component,
PropTypes
} from 'react';
import shallowCompare from 'react-addons-shallow-compare';
class TextInput extends Component {
constructor(props) {
super(props);
this.state = { stateValue: '' };
import {
getLocationOrigin
} from '../fetchTools';
const BASE_URL = getLocationOrigin();
export const promisedHttpRequest = (endpoint, options, onProgressCallback) => {
request('GET', `${BASE_URL}/${endpoint}`, options, onProgressCallback);
};
import React, { Component } from 'react';
import { Motion, spring } from 'react-motion';
const styles = {
container: {
borderRadius: '4px',
backgroundColor: 'rgb(240, 240, 232)',
position: 'relative',
margin: '5px 3px 10px',
width: '450px',
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity
} from 'react-native';
import { Motion, spring } from 'react-motion';
// ReactJS:
<Motion style={{x: spring(this.state.open ? 400 : 0)}}>
{({x}) =>
<div style={styles.container}>
<div
style={
{
...styles.movingCube,
WebkitTransform: `translate3d(${x}px, 0, 0)`,
transform: `translate3d(${x}px, 0, 0)`
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView,
Animated
} from 'react-native';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView,
Animated
} from 'react-native';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView,
Animated
} from 'react-native';