Skip to content

Instantly share code, notes, and snippets.

View carly-lee's full-sized avatar

Eunjeong Lee carly-lee

  • Berlin, Germany
View GitHub Profile
@carly-lee
carly-lee / RCTSwiftBridgeModule.h
Created June 28, 2018 14:12 — forked from robertjpayne/RCTSwiftBridgeModule.h
React Native - Swift Native Modules
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
#define RCT_EXTERN_MODULE(objc_name, objc_supername) \
RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername)
#define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \
objc_name : objc_supername \
@end \
@interface objc_name (RCTExternModule) <RCTBridgeModule> \
@carly-lee
carly-lee / README.md
Created June 21, 2018 10:15 — 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,
@carly-lee
carly-lee / iOS-StoreKit-ErrorCode.md
Last active October 29, 2021 14:46
iOS StoreKit error code
  kCFURLErrorHTTPTooManyRedirects   = -1007, kCFURLErrorUnknown   = -998,
  kCFURLErrorCancelled = -999,
  kCFURLErrorBadURL    = -1000,
  kCFURLErrorTimedOut  = -1001,
  kCFURLErrorUnsupportedURL = -1002,
  kCFURLErrorCannotFindHost = -1003,
  kCFURLErrorCannotConnectToHost    = -1004,
  kCFURLErrorNetworkConnectionLost  = -1005,
  kCFURLErrorDNSLookupFailed        = -1006,
@carly-lee
carly-lee / what-is-functional-programming.md
Last active August 14, 2021 04:04
함수형 프로그래밍 기본에 대한 정리

Functional Programming

Functional Programming is a style of writing programs by simply composing a set of pure functions.

순수한 함수들을 조합하여 프로그램을 만드는 방법론

함수형 프로그래밍에서 중요한 원칙들

  • Pure functions
  • Function composition
  • Avoid shared state
@carly-lee
carly-lee / Professor-Frisby-Introduces-Composable-Functional-JavaScript-1-7(in-Korean).md
Last active September 22, 2022 07:12
프로페서 프리스비의 조합 가능한 함수형 자바스크립트로의 소개

egghead.io에 있는 위 강의를 간략히 정리한 스터디 노트입니다.

1. 컨테이너 스타일 유형의 데이터 타입(Box)으로 선형 데이터 흐름 만들기

아래의 예시 코드에서는 여러가지 일이 하나의 함수 안에서 일어납니다. 아래의 함수가 하는 일은 문자열을 받아서 trim하고 그걸 integer로 바꾸고 거기에 숫자 1을 더한 후, 그 숫자 값의 문자를 출력하는 것입니다.

const nextCharForNumberString = str => {
@carly-lee
carly-lee / React-Native-Unit-Testing.md
Created August 17, 2017 09:39
Note for Unit testing on React Native

Unit Testing

Set up

// package.json
"jest": {
    "preset": "react-native",
    "verbose": true,
    "timers": "fake", // No need to wait actual time 
@carly-lee
carly-lee / Enhance.js
Created August 17, 2017 08:43 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {