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 "FancyViewManager.h" | |
#import <React/UIView+React.h> | |
@interface FancyViewManager () | |
@end | |
@implementation FancyViewManager | |
/* |
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 <React/RCTViewManager.h> | |
@interface FancyViewManager : RCTViewManager | |
@end |
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
package pl.wp.wdi | |
import android.graphics.Color; | |
import android.view.View | |
import com.facebook.react.uimanager.SimpleViewManager | |
import com.facebook.react.uimanager.ThemedReactContext | |
class FancyViewManager: SimpleViewManager<View>() { | |
override fun getName(): String { |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import re | |
def main(): | |
ps = subprocess.Popen(['ifconfig','-a'], shell=False, stdout=subprocess.PIPE) | |
grep = subprocess.Popen(['grep', 'flags='], shell=False, stdin=ps.stdout, stdout=subprocess.PIPE) | |
grep_output,_ = grep.communicate() |
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 React, { Component } from "react"; | |
// (...) | |
import { NativeModules } from "react-native"; | |
// (...) | |
export default class App extends Component<Props> { | |
componentDidMount = () => { | |
const { FancyNativeModule } = NativeModules; | |
FancyNativeModule.addNumbers(1, 2).then(result => { |
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
package pl.wp.wdi | |
import android.content.Intent | |
import com.facebook.react.bridge.ReactApplicationContext | |
import com.facebook.react.bridge.ReactContextBaseJavaModule | |
import com.facebook.react.bridge.ReactMethod | |
import com.facebook.react.bridge.Promise; | |
import android.util.Log |
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 React, { Component } from "react"; | |
// (...) | |
import { NativeModules } from "react-native"; | |
// (...) | |
export default class App extends Component<Props> { | |
componentDidMount = () => { | |
const { FancyNativeModule } = NativeModules; | |
FancyNativeModule.saySomething("Something") |
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 "FancyNativeModule.h" | |
@interface FancyNativeModule() | |
@end | |
@implementation FancyNativeModule | |
RCT_EXPORT_MODULE() |
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
package pl.wp.wdi | |
import com.facebook.react.bridge.ReactApplicationContext | |
import com.facebook.react.bridge.ReactContextBaseJavaModule | |
import com.facebook.react.bridge.ReactMethod | |
import android.util.Log | |
class FancyManager(reactContext: ReactApplicationContext): ReactContextBaseJavaModule(reactContext) { | |
override fun getName(): String { |
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
package pl.wp.wdi | |
import com.facebook.react.ReactPackage | |
import com.facebook.react.bridge.NativeModule | |
import com.facebook.react.bridge.ReactApplicationContext | |
import java.util.* | |
class FancyPackage : ReactPackage { | |
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> { | |
val modules = ArrayList<NativeModule>() |