Skip to content

Instantly share code, notes, and snippets.

View hg-pyun's full-sized avatar
🎯
Focusing

Haegul Pyun hg-pyun

🎯
Focusing
View GitHub Profile
@AliMD
AliMD / gist:3344523
Created August 13, 2012 22:28
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@qodot
qodot / es6-symbol-iterator-generator.md
Last active July 31, 2023 01:30
ES6의 심볼, 이터레이터, 제네레이터에 대해 알아보자

심볼

심볼이 무엇인가? ES6에서 새로 선보인 원시 타입이다.

  • Undefined
  • Null
  • Boolean
  • Number
  • String
  • Object
@hg-pyun
hg-pyun / medium_react_v16.3.0_01.js
Created April 4, 2018 13:46
react v16.3.0 medium 01
const ThemeContext = React.createContext('light');
class ThemeProvider extends React.Component {
state = {theme: 'light'};
render() {
return (
<ThemeContext.Provider value={this.state.theme}>
{this.props.children}
</ThemeContext.Provider>
@hg-pyun
hg-pyun / medium_react_v16.3.0_02.js
Last active June 22, 2018 15:07
react v16.3.0 medium 02
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.inputRef = React.createRef();
}
render() {
return <input type="text" ref={this.inputRef} />;
}
@hg-pyun
hg-pyun / medium_react_v16.3.0_04.js
Last active September 9, 2018 05:20
react v16.3.0 medium 04
class FancyButton extends React.Component {
buttonRef = React.createRef();
focus() {
this.buttonRef.current.focus();
}
render() {
const {label, theme, ...rest} = this.props;
return (
@hg-pyun
hg-pyun / medium_react_v16.3.0_03.js
Created April 4, 2018 14:04
react v16.3.0 medium 03
function withTheme(Component) {
return function ThemedComponent(props) {
return (
<ThemeContext.Consumer>
{theme => <Component {...props} theme={theme} />}
</ThemeContext.Consumer>
);
};
}
@hg-pyun
hg-pyun / medium_react_v16.3.0_05.js
Created April 4, 2018 14:05
react v16.3.0 medium 05
function withTheme(Component) {
function ThemedComponent({forwardedRef, ...rest}) {
return (
<ThemeContext.Consumer>
{theme => (
// Assign the custom prop "forwardedRef" as a ref
<Component
{...rest}
ref={forwardedRef}
theme={theme}
<DataProvider render={data => (
<h1>Hello {data.target}</h1>
)}/>
class MouseTracker extends React.Component {
constructor(props) {
super(props);
this.handleMouseMove = this.handleMouseMove.bind(this);
this.state = { x: 0, y: 0 };
}
handleMouseMove(event) {
this.setState({
x: event.clientX,