I hereby claim:
- I am ryardley on github.
- I am ryardl (https://keybase.io/ryardl) on keybase.
- I have a public key ASBYRGZRhFPvU4E3PXOXnk1w6KeFUwQNFax6Y_jPMfHVDwo
To claim this, I am signing this object:
mkdir -p ios/ReactBridge |
// ./ios/ReactBridge/RCTHelloWorld.m | |
#import "RCTHelloWorld.h" | |
#import "HWHelloWorld.h" | |
@implementation RCTHelloWorld{ | |
HWHelloWorld *_cppApi; | |
} | |
- (RCTHelloWorld *)init | |
{ |
// ./ios/ReactBridge/RCTHelloWorld.h | |
#import <React/RCTBridgeModule.h> | |
@interface RCTHelloWorld : NSObject <RCTBridgeModule> | |
@end |
// @flow | |
import React, { Component } from "react"; | |
import { NativeModules, StyleSheet, Text, View } from "react-native"; | |
type Props = {}; | |
type State = { message: string }; | |
const { HelloWorld } = NativeModules; | |
export default class App extends Component<Props, State> { | |
state = { | |
message: "loading..." |
npx -p react-native-cli react-native init CppReactNative && cd ./CppReactNative |
I hereby claim:
To claim this, I am signing this object:
let firstRender = true; | |
function RenderFunctionComponent() { | |
let initName; | |
if(firstRender){ | |
[initName] = useState("Rudi"); | |
firstRender = false; | |
} | |
const [firstName, setFirstName] = useState(initName); |
function RenderFunctionComponent() { | |
const [firstName, setFirstName] = useState("Rudi"); | |
const [lastName, setLastName] = useState("Yardley"); | |
return ( | |
<Button onClick={() => setFirstName("Fred")}>Fred</Button> | |
); | |
} |
let state = []; | |
let setters = []; | |
let firstRun = true; | |
let cursor = 0; | |
function createSetter(cursor) { | |
return function setterWithCursor(newVal) { | |
state[cursor] = newVal; | |
}; | |
} |
<DataProvider render={data => ( | |
<h1>Hello {data.target}</h1> | |
)}/> |