import React, { Component } from 'react';
import {
StyleSheet,
View,
Animated,
Text,
TouchableOpacity,
} from 'react-native';
Native Module in React-Native
To get a great grip on how wo build one, read these blogs.
- https://github.com/peggyrayzis/react-native-create-bridge
- https://shift.infinite.red/beginner-s-guide-to-using-cocoapods-with-react-native-46cb4d372995
- http://moduscreate.com/swift-modules-for-react-native/
- http://browniefed.com/blog/react-native-how-to-bridge-an-objective-c-view-component/
- http://brentvatne.ca/react-native-view-component-1/
- http://brentvatne.ca/react-native-view-component-2/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multipleTapHandler from 'multipleTapHandler'; | |
// Tap Event | |
const onTap = () => { | |
console.log("onTapEvent called.") | |
} | |
// Actual user Tap. | |
tap = multipleTapHandler(() => {onTap()}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { take, fork } from 'redux-saga/effects'; | |
function actionHelper(type, args) { | |
return { | |
type, | |
...args | |
}; | |
} | |
function sagaTakeWatcherHelper(worker, type) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.uix.gridlayout import GridLayout | |
class Container(GridLayout): | |
pass | |
class MainApp(App): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Container>: | |
rows: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Container>: | |
display: display | |
rows: 1 | |
BoxLayout: | |
orientation: "vertical" | |
AddButton: | |
on_release: root.add_one() | |
SubtractButton: | |
on_release: root.subtract_one() | |
Label: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.button import Button | |
from kivy.properties import ObjectProperty | |
from kivy.uix.gridlayout import GridLayout | |
from os import listdir | |
kv_path = './kv/' | |
for kv in listdir(kv_path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Container>: | |
display: display | |
rows: 1 | |
BoxLayout: | |
orientation: "vertical" | |
AddButton: | |
on_release: root.add_one() | |
SubtractButton: | |
on_release: root.subtract_one() | |
Label: |