Skip to content

Instantly share code, notes, and snippets.

View jiin-kim109's full-sized avatar

Jiin Kim jiin-kim109

View GitHub Profile
@jiin-kim109
jiin-kim109 / AWSCertifiedDeveloperUnofficialStudyGuide.md
Created March 5, 2023 15:16 — forked from serithemage/AWSCertifiedDeveloperUnofficialStudyGuide.md
AWS 공인 개발자 - 어소시에이트 수험 가이드
@jiin-kim109
jiin-kim109 / ToggleButton.tsx
Last active September 14, 2020 21:00
Typescript React Native HoC
export const withTouchableGradient = <P extends object>(Component: React.ComponentType<P>)
: React.FunctionComponent<P & WithTouchableGradientProps> =>
({onPress, colorPreset, withShadow, ...props}: WithTouchableGradientProps) =>
{
const { colors, start, end, locations } = GetGradientStyle(colorPreset);
const shadow = {
shadowColor: '#000000',
shadowOffset: { //iOS shadow
width: 0,
height: 3
@jiin-kim109
jiin-kim109 / Component.jsx
Last active September 14, 2020 20:25
React Context API provider & reducer
import { actionTypes } from './reducer';
const [{ user }, dispatch] = useStateValue();
// or without dispatch as
// const [{user}] = useStateValue();
auth.signInWithPopup(provider)
.then((result) => {
dispatch({
type: actionTypes.SET_USER,