Giter Site home page Giter Site logo

lv-kit / react-query-spacex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gomagoma676/react-query-spacex

0.0 0.0 0.0 76 KB

[Hasura応用編] Nextjs + Firebase + HasuraによるGraphQL Web開発 : Section 2-> SpaceX API 🚀

TypeScript 68.83% JavaScript 4.98% CSS 26.19%

react-query-spacex's Introduction

🌟 Project setup 🚀

1. create next app

1-1. yarn install *インストールしていない場合

npm install --global yarn
yarn --version

1-2. create-next-app

npx create-next-app .

Node.js version 10.13以降が必要です。 -> ターミナル node -vでver確認出来ます。

1-3. react-queryのインストール

yarn add @heroicons/react
yarn add react-query react-query-devtools graphql graphql-request

1-4. prettierの設定 : settingsでRequire Config + Format On Saveにチェック

touch .prettierrc
{
    "singleQuote": true,
    "semi": false
}

2. TypeScript の導入

https://nextjs.org/learn/excel/typescript/create-tsconfig

2-1. 空のtsconfig.json作成

touch tsconfig.json

2-2. 必要moduleのインストール

yarn add -D typescript @types/react @types/node

2-3. 開発server起動

yarn dev

2-4. _app.js, index.js -> tsx へ拡張子変更

2-5. AppProps型追記

import { AppProps } from 'next/app'

function MyApp({ Component, pageProps }: AppProps) {
    return <Component {...pageProps} />
}

export default MyApp

3. Tailwind CSS の導入

https://tailwindcss.com/docs/guides/nextjs

3-1. 必要moduleのインストール

yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest

3-2. tailwind.config.js, postcss.config.jsの生成

npx tailwindcss init -p

3-3. tailwind.config.jsのpurge設定追加

module.exports = {
    purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
    darkMode: false,
    theme: {
        extend: {},
    },
    variants: {
        extend: {},
    },
    plugins: [],
}

3-4. globals.cssの編集

@tailwind base;
@tailwind components;
@tailwind utilities;

react-query-spacex's People

Contributors

gomagoma676 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.