MBP(はてな)

MacBook Pro,iPhone Xs,React

2021-08-09から1日間の記事一覧

Qiitaのclassをfunctionに変更

無限スクロールの処理 useEffectを使って、pageが変化したらhandleClick()を実行するように変更 handleClick()の中にpageを+1する処理があると無限ループになるので注意 useEffect(() => { //document.title = `page = ${page}, message = ${message}`; hand…

Netlify FunctionsでZenn Trend APIを作成

先に、Netlify Fuctionsを設定。 Netlify FunctionsでHello World - MBP(はてな)$ vi functions/trendTech.ts して、 zenn-trend-api/trendTech.ts at main · HelloRusk/zenn-trend-api · GitHub と同じ内容にする。 $ npm install axios $ npm install chee…

Netlify FunctionsでHello World

先に、NetlifyでReact Appを作成 netlifyでReact App - MBP(はてな) Netlify Functionsで作るサーバーサイド機能 | 第1回 Netlify Functionsとは | CodeGrid

AWS AmplifyでReact App

$ npx create-react-app amplify-react-pages $ cd amplifyapp $ npm startGitHubにリポジトリを作成して、push $ git remote add origin git@github.com:hiroyuki12/amplify-react-pages.git $ git branch -M main $ git push -u origin mainAWSコンソール…