Skip to content

Instantly share code, notes, and snippets.

View kenmori's full-sized avatar

KenjiMorita kenmori

View GitHub Profile
@kenmori
kenmori / GraphQLPlayground.md
Last active March 10, 2019 10:55
GraphQLPlayground

valiables

{
  "after": null,
  "before": null,
  "first": 5,
  "last": null,
  "query": "フロントエンドエンジニア"
}

android list avd ・・・作成されているAVD情報を書き出す

    Name: Nexus_5X_API_23
  Device: Nexus 5X (Google)
    Path: /Users/kenjimorita/.android/avd/Nexus_5X_API_23.avd
  Target: Google APIs (Google Inc.)
          Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86_64
    Skin: nexus_5x
 Sdcard: 100M
@kenmori
kenmori / An Effect function must not return anything besides a function.md
Last active June 12, 2022 05:09
An Effect function must not return anything besides a function

if you occure below cord

index.js:2178 Warning: An Effect function must not return anything besides a function, which is used for clean-up.

It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, you may write an async function separately and then call it from inside the effect:

async function fetchComment(commentId) {
  // You can await here
}
@kenmori
kenmori / react16.8.md
Last active February 7, 2019 08:29
react16.8 playground
const LifecycleDemo = ({ meId }) => {
 const [count, stateCount] = useState(0);
 useEffect(
   () => {
     console.log(meId, 'render');
     return () => console.log('unmounting...'); //returnすると componentWillUnmount
   },
[meId]
@kenmori
kenmori / ts.md
Last active February 2, 2019 06:32
TypeSript初学者による理解

Redux

呼び出し側

<F name={name} age={age} handler={handler} />
# str
s = "hello"
type(s) == str
True

# float
f = 7.77
type(f) == float
@kenmori
kenmori / 一介のフロントがAWSに100日なんでもいいから触れ続ける旅.md
Last active January 18, 2019 11:20
一介のフロントがAWSに100日なんでもいいから一日10分触れ続ける旅
@kenmori
kenmori / how_to_prevent_to_submit_for_enter-key_in_react-redux-form.md
Last active January 17, 2019 07:25
【react-redux-form】でEnter keyでsubmitされてしまうのを無効にする

this is render component to pass Field Component

When you use render attribute to pass component

// text textarea
const renderField = ({
  input,
  type,
  placeholder,
  tabIndex,
@kenmori
kenmori / gist:775412f7fa98b4c2e7082d5d951a0ada
Last active January 13, 2019 03:00
Udemy「33. URLから投稿IDを取得しよう」のpost_idをパラメータで取得してviewsに渡す処理Djang 1.x系と2.xの違い
  1. URLから投稿IDを取得しよう
# myblogapp/urls.py

from django.contrib import admin

from django.urls import path, include
@kenmori
kenmori / file to exclude in VSC.md
Last active January 8, 2019 02:39
file to exclude in VSC for Front End

main.*.js.map,main.*.js,node_modules, .html, main, registerServiceWorker.js, start.js, build.js, lib/ , .history