React.js– category –
-
React.js
【React】React17でのちょっとした変更・対応箇所
【React】React17でのちょっとした変更・対応箇所 これらを参照にしています reactjs/rfcs New JSX Enhancements in React 17 @dilanthaw111 からの要約記事です React v17から React 17コンパイラはreact/jsx-runtime import React from "react"... -
React.js
【解決】Module not found: Can’t resolve ‘@material-ui/core’
【解決】Module not found: Can't resolve '@material-ui/core' when you run as yarn start, compile error occurs like above image. then, comfirm your node version this is work version node -v // v12.18.3 npm -v // 6.14.6 fix from "mater... -
React.js
【解決】React。「There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.」
【解決】React。「There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.」 これが出た時の対処法。 提供されているcreate React Appは "webpack":... -
React.js
【React】normalizrの簡単なsample(example)はこちら
【React】normalizrの簡単なsample(example)はこちら 現場が最近になってnormalizrを使い出したのでちょこっといじる 大変ですものね... -
React.js
【React】useCallbackの関数に名前をつける
【React】useCallbackの関数に名前をつける useCallbackの関数に名前をつけると 何をしているのかが実装内容を読まないでも関数名からわかる 開発ツールのところに名前がつく -
React.js
Example Mock App(React x Redux x TypeScript x react-router x redux-thunk x mock-server) with Creat-React-App
Example Mock App(React x Redux x TypeScript x react-router x redux-thunk x mock-server) Whenever I tried to try something, I needed to set up Redux, react-router, server, etc. as well as React and TypeScript, so I made it from the direct... -
Rendered fewer hooks than expected
解決【React】Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.」
解決【React】Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.」 2020/3/1更新。 This is mainly an error when using hooks in the render function. It's gone if you remove the ho... -
chartjs2-typescript
【React-ChartJS2-TypeScript】Reactでグラフを作る際に色を塗りにして、クリックイベントを取得する(When creating a graph with React-chartjs2, paint the color and get the click event)
【React-ChartJS2-TypeScript】Reactでグラフを作る際に色を塗りにして、クリックイベントを取得する(When creating a graph with React-chartjs2, paint the color and get the click event) Reactでグラフを作る機会がありどれがいいんだろうと思って探... -
Error: Storybook preview hooks can only be called inside decorators and story functions.
【解決】勝手に追加されてただけ。Error: Storybook preview hooks can only be called inside decorators and story functions.
【解決】勝手に追加されてただけ。Error: Storybook preview hooks can only be called inside decorators and story functions. 開発してるとよくでてくる、「Error: Storybook preview hooks can only be called inside decorators and story functions.... -
PDF
【React】ボタン押下でcomponentをPDF出力する(Function to generate and download PDF as it is by converting components into images once with react)
【React】ボタン押下でcomponentをPDF出力する(Function to generate and download PDF as it is by converting components into images once with react) -
DragAndDrop
[解決]なぜDragAndDrop(ドラッグアンドドロップ)を「DnD」というの?なぜ「DaD」じゃないの
[解決]なぜDragAndDrop(ドラッグアンドドロップ)を「DnD」というの?なぜ「DaD」じゃないの こんにちは。吉本芸人していますもりたともうします。 最近React DnD を使っているのですが、 ディレクターから急に個人宛Slackに送られてきた内容がこちらです。... -
attribute
【React Tips/ 属性の有無をpropsで出し分ける】if component has props of id as trusy value, It will be add attribute of id. if not, will be remove attribute of id
[React Tips/ 属性の有無をpropsで出し分ける]if component has props of id as trusy value, It will be add attribute of id. if not, will be remove attribute of id <div id={id & id}>Hello</div> 最近周りの人のコードで上... -
useContext
[React16.8]useContextでCreate Global Store。with ContextAPI (not Redux)
[React16.8]useContextでCreate Global Store。with ContextAPI (not Redux) これからしん気案件やる際にreaduxは避けたいなと思って調べてContext APIでブローバルにStoreを持つ際のコードを調べてみた Providerをネストさせて最後にchildrenを出力するSt... -
mount
ReactのMountとは何か
ReactのMountとは何か -
useCallback
【4日目React Hooks Sample-Example/useCallback】get DOM info with callback which assign to ref(DOMの要素情報を取得する )
【4日目React Hooks Sample-Example/useCallback】get DOM info with callback which assign to ref(DOMの要素情報を取得する ) ちょっと明日用事があるので更新途絶えます これはドキュメントにも書いてある方法です 依存しないcallbackをrefに渡すことで... -
useReducer-useContext
[これ。React Hooks Sample/ useReducer and useContext] Toogle Box
[これ。React Hooks Sample-Example/ useReducer and useContext] Toogle Box もうちょっと改善できそうですが一旦これで 何が改善点かというとパフォーマンスです それぞれ対応するBoxだけがレンダリングすればいいのですが、全体に影響しています これを... -
useRef
[これ。React Hooks Sample/ useRef] Receive child changes from parents using useRef
[これ。React 16.8 Sample/ useRef] Receive child changes from parents using useRef useRef ・dataを保存できる。 ・stateの変更によるRerenderを引き起こさない ・そのデータを覚えていて、setStateをしても変わらない。refはインスタンス変数として使... -
jest
これ[ Jest x apollo Query] TypeError: Cannot destructure property [PropertyName] of ‘undefined’ or ‘null’.
これ[ Jest x apollo Query] TypeError: Cannot destructure property [PropertyName] of 'undefined' or 'null'. -
InMemoryCache
Apollo-clientのInMemoryCache(キャッシュ)と向きあう(__typenameとはとか)
Apollo-clientのInMemoryCache(キャッシュ)と向きあう こちらはドキュメントを意訳したものと、わかりづらかったところを多少追加したものです -
update
解決[apollo でupdate関数内] Store error: the application attempted to write an object with no provided typename but the store already contains an object with typename of MessageConnection for the object of id
解決[apollo でupdate関数内] Store error: the application attempted to write an object with no provided typename but the store already contains an object with typename of MessageConnection for the object of id