Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

KenjiMorita kenmori

🏠
Working from home
Block or report user

Report or block kenmori

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kenmori
kenmori / ReduxStyleGuide.md
Last active Jan 19, 2020
Redux StyleGuideまとめ
View ReduxStyleGuide.md

ReduxStyleGuide

Priority A Rules: Essential

Do Not Mutate State

stateを変化させない

Priority B: Strongly Recommended

@kenmori
kenmori / reduce.md
Last active Jan 13, 2020
reduceに強くなる記事
View reduce.md

1

元の型

[{eee: "kenji", value: "22"}, {aa: "keiko", value: "30"}]

期待する型

@kenmori
kenmori / Handling for union when you do not want to use type guard.md
Last active Jan 4, 2020
Handling for union when you do not want to use type guard
View Handling for union when you do not want to use type guard.md

Handling for union when you do not want to use type guard

You need to type gurd this

type Uni = "A" | "B"

type Fa = {
    contentType : Uni
}
@kenmori
kenmori / 2020年目標設定.md
Last active Jan 1, 2020
2020年目標設定
View 2020年目標設定.md

2020年目標設定

仕事面

  • 売り上げを上げる(25%アップさせたい)
  • 案件を5つ持つ
  • 違う言語の習得&実務

健康面

  • ロードレースの大会に出たい(15km)
@kenmori
kenmori / childrenが合ったらさらに再帰処理.md
Last active Dec 27, 2019
TypeScript「Recursive processing if children are a in parent」parentの中にchildrenがaったらさらに再帰処理
View childrenが合ったらさらに再帰処理.md

TypeScript「Recursive processing if children are a in parent」parentの中にchildrenがあったらさらに再帰処理

type is here.

type Group = {
id: number;
value: string;
parentId: number;
children: Group[];
@kenmori
kenmori / Uncaught Error: Rendered fewer hooks than expected.md
Created Dec 25, 2019
解決【React】Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.」
View Uncaught Error: Rendered fewer hooks than expected.md

解決【React】Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.」

from

const Contents = (props: ContentsProps) => {
    return (
        <div key={props.title}>
            {props.contents.map( // here!!!
@kenmori
kenmori / vscodevim-dosent-work.md
Last active Dec 14, 2019
vscodevim suddenly stops working。vscodevim(1.12.2)でバックスペース削除ができなくなる問題
View vscodevim-dosent-work.md

vscodevim suddenly stops working。vscodevim(1.12.2)でバックスペース削除ができなくなる問題

aboutme/twitter

Do you want to solve it temporarily?(とりあえず早く開発しなくてはいけないのでサックと解決したい方)

  • vscodevimの拡張機能をuninstall

@kenmori
kenmori / styled-component-typescdript-react-create-app.md
Last active Dec 13, 2019
styled-component-typescdript-react-create-appでreset-css
View styled-component-typescdript-react-create-app.md

styled-component-TypeScript-react-create-app(CRA)でreset-css(リセットCSS)

CRAでstyled-componentを導入し、cssをreset(リセットCSS)する方法

地味に記事がなかったので

@bukotsunikki

やること

  • Themeを入れる
@kenmori
kenmori / まだまだTypeScript.md
Last active Dec 1, 2019
まだまだTypeScript
View まだまだTypeScript.md

まだまだTypeScript

Recordを使って型を一括変換

type Obj = {
    name: string
    age: number
}
@kenmori
kenmori / nullishcoalescing.md
Last active Dec 1, 2019
【TypeScript 3.7】nullish coalescing opearatorとは
View nullishcoalescing.md

TypeScript 3.7 nullish coalescing opearatorとは

下記はTypeScript Playgroundの What's Newにあるものの少しの日本語訳とそれをもとに試してみたことです

// The nullish coalescing operator is an alternative to ||
// which returns the right-side expression if the left-side
You can’t perform that action at this time.