만약에 MongoDB 를 PC에 설치하는것이 부담스럽다면, mLab 에서 무료로 호스팅을 받을 수 있습니다.
회원가입 / 로그인을 하고 상단의 Create New 버튼을 누르고,
import React from 'react'; | |
import PageTemplate from 'components/common/PageTemplate'; | |
import PostContainer from 'containers/post/PostContainer'; | |
import AskRemoveModalContainer from 'containers/modal/AskRemoveModalContainer'; | |
import * as postActions from 'store/modules/post'; | |
const PostPage = ({match}) => { | |
const { id } = match.params; | |
return ( |
// @flow | |
import { createAction, handleActions, type ActionType } from 'redux-actions'; | |
import produce from 'immer'; | |
/* ACTION TYPE */ | |
const INCREASE = 'counter/INCREASE'; | |
/* ACTION CREATOR */ | |
const increase = createAction(INCREASE, (value: number) => value); |
만약에 MongoDB 를 PC에 설치하는것이 부담스럽다면, mLab 에서 무료로 호스팅을 받을 수 있습니다.
회원가입 / 로그인을 하고 상단의 Create New 버튼을 누르고,
{ | |
"Create Stateless component": { | |
"prefix": "rsc", | |
"body": [ | |
"import * as React from 'react';", | |
"", | |
"interface ${1:${TM_FILENAME_BASE}}Props {", | |
" someProps: boolean;", | |
"}", | |
"", |
import React from 'react'; | |
export default function asyncComponent(getComponent) { | |
class AsyncComponent extends React.Component { | |
static Component = null; | |
state = { Component: AsyncComponent.Component }; | |
componentWillMount() { |
{ | |
"Object Destructure from this.props": { | |
"prefix": "odprops", | |
"body": [ | |
"const { ${1:value} } = this.props;" | |
], | |
"description": "" | |
}, | |
"Re-export": { | |
"prefix": "rexp", |
import React, { createContext, useContext } from 'react'; | |
const MyContext = createContext('defaultValue'); | |
function Child() { | |
const text = useContext(MyContext); | |
return <div>안녕하세요? {text}</div> | |
} | |
function Parent() { |