React– category –
-
React
material-tableのexportCsvを使って出力をカスタマイズする
この記事ではmaterial-tableのexportCsvを使って出力するCSVをカスタマイズする方法をご紹介します。 exportCsvは出力するCSVの内容を変更できるオプションプロパティです。 Function to create a custom CSV fileカスタムCSVファイルを作成する機能https:... -
React
Cannot invoke an object which is possibly ‘undefined’.
In this article, I will show you how to solve the problem of "Cannot invoke an object which is possibly 'undefined'. In this article, I will show you how to solve the problem when you get the error "Cannot invoke an object which is possi... -
React
Cannot invoke an object which is possibly ‘undefined’.
この記事ではtypescriptで「Cannot invoke an object which is possibly 'undefined'.」というエラーが出たときの解決方法をご紹介します。 このエラーが出る型定義は以下の通りです。 export type ButtonProps = { ... handleOnClick?: () => void; };... -
React
[Next.js] Using axios to get data with SWR
I will show you how to use axios to get data in Next.js SWR. The API server is assumed to be Laravel.We also assume that Laravel is using Eloquent's API Resources when returning data. https://laravel.com/docs/8.x/eloquent-resources So, w... -
React
【Next.js】useSWR()でPOSTする
useSWR()を使ってデータを取得するには以下の方法で取得できました。 const commentsFetcher = (url: string): Promise<fetchCommentsReturnType> => axios(url).then((res) => res.data); const { data: comments, error:commentsError } = u... -
React
【Next.js】axiosを使ってSWRで取得する
Next.jsのSWRでデータを取得するときにaxiosを使った方法をご紹介します。 APIサーバーはLaravelを想定しています。また、Laravelでデータを返すときはEloquentのAPI Resourcesを使用しているものとします。 https://laravel.com/docs/8.x/eloquent-resour... -
React
Controlling Material UI v4 Form with React Hook Form v7
In this article, I will show you how to control a Material UI v4 form with React Hook Form v7. Material UI's TextField, Radio, and Select work just fine, but Checkbox requires some tricks and ingenuity.Here is a sample code for your refe... -
React
Controlling Material UI v4’s Checkbox with React Hook Form v7
In Controlling Material UI's Checkbox with React Hook Form, I introduced how to control Material UI's Checkbox with React Hook Form v6. After that, React Hook Form v7 was released.The way to control Material-UI has changed a little in Re... -
React
How to use Next.js and Material-UI’s Link together
Next.js links and Material-UI links cannot normally be used together.However, with a little ingenuity, they can be used together. The following are the requirements for the Link component that we will create using Next.js and Material-UI... -
React
Use material-table in Next.js
Next.js and material-table are very easy to use and I use them a lot.However, they don't work well together, and material-table doesn't work straightforwardly with Next.js. There is a sticking point for using material-table in Next.js, a...