並び順

ブックマーク数

期間指定

  • から
  • まで

441 - 480 件 / 886件

新着順 人気順

react.jsの検索結果441 - 480 件 / 886件

  • SWR v2 をリリースしました

    メンテナとして関わっていた SWR v2 がリリースされましたので紹介したいと思います。 各機能の細かい紹介については、リリースブログを確認してください。日本語翻訳も行ったので日本語で読むこともできます。 https://swr.vercel.app/ja/blog/swr-v2 ここでは、ざっくりと補足を書きたいと思います。 Mutation 周り useSWRMutation 一番わかりやすいのは、新しい useSWRMutation という Hook が追加されたことです。swr/mutation から import できます。 import useSWRMutation from 'swr/mutation' async function sendRequest(url, { arg }) { return fetch(url, { method: 'POST', body: JS

    • Web Design System: Migrating Web Components To React | Mercari Engineering

      This post is for Day 8 of Mercari Advent Calendar 2022, brought to you by Williams Kwan from Mercari Core team and Faisal Rahman from the Mercari Architect team. Intro Mercari internal design systems power the UI in Mercari web apps. It allows Frontend engineers to implement UI changes quickly by providing UI building blocks. The design system is currently built using Web Components but we are in

        Web Design System: Migrating Web Components To React | Mercari Engineering
      • React HooksとVue Composition APIの比較

        概要 Vueの作者であるEvan You氏は、Vueのデフォルトバージョンが2022年2月7日以降3.x系に切り替わる事を開発者ブログにおいて発表しました。 それに伴い、Vue2.x系の最後のマイナーバージョンであるVue2.7が2022年7月1日にリリースされ、こちらの LTS (long-term support)はリリースから18ヶ月であることから、Vue2.x系へのサポートは2023年12月を持って完全に打ち切られる事となりました。 以下の記事でも語られている通りVue2とVue3では破壊的変更が多く、移行コストが格段に高いことから、多くの開発チームがVue3.x系への移行を頑張るかReact等の他のフレームワークへの乗り換えをするかの選択を迫られています。 3.x系へ移行すべきかフレームワークを乗り換えるべきかの是非についてはこの記事では触れませんが、Vueの破壊的変更に伴って多

          React HooksとVue Composition APIの比較
        • JSXのファクトリ関数を自作する方法と、Reactと全然違う挙動をさせるサンプル - Qiita

          import React from "react"; const Component = () => <div />; ^ JSX

            JSXのファクトリ関数を自作する方法と、Reactと全然違う挙動をさせるサンプル - Qiita
          • GitHub - vercel/server-components-notes-demo: Experimental demo of React Server Components with Next.js. Deployed serverlessly on Vercel.

            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

              GitHub - vercel/server-components-notes-demo: Experimental demo of React Server Components with Next.js. Deployed serverlessly on Vercel.
            • 拡張性に優れた React Aria のコンポーネント設計

              React Aria Components は Adobe によって提供されている Headless UI コンポーネントライブラリです。振る舞いや国際化に, アクセシビリティに関する機能を備えており、Button や Input, TextField, Label などのシンプルな要素から、DatePicker や ComboBox などの様々なコンポーネントが提供されています。 今回は React Aria Components の設計について紹介します。 React Aria Components のコンポーネントの設計 React Aria Components の API はコンポジションを中心に設計されています。これにより、パターン間で共通のコンポーネントを共有することも、個別に使用することも可能です。なお、コンポジションについては React Component Compos

                拡張性に優れた React Aria のコンポーネント設計
              • Fullstack app with TypeScript, Next.js, Prisma & GraphQL

                This article is the first part of a course where we build a fullstack app with Next.js, GraphQL, TypeScript,Prisma and PostgreSQL. In this article, we'll create the data model and explore the different components of Prisma.

                  Fullstack app with TypeScript, Next.js, Prisma & GraphQL
                • Remotion | Make videos programmatically in React

                  Real .mp4 videosRemotion renders all frames to images and encodes them to a real video - audio support included. WebM and other formats are also supported. Fast and delightful editingPreview your video in the browser. Fast refresh while the video is playing. Scrub through the timeline to get every frame perfect. Programmatic content and renderingFetch data from an API and use it as the content. Di

                    Remotion | Make videos programmatically in React
                  • React 新しい状態管理ライブラリ Recoil の紹介

                    2020/05 Facebook から新しい状態管理ライブラリ Recoil がリリースされました。 まだ実験的な実装のようですが、これまでの状態管理のアプローチにない魅力があったので試していきます。 Recoil の何が嬉しい? React で一番有名な状態管理ライブラリといえば Redux ですが、 Redux は root コンポーネントなど上位のコンポーネントで Provider を設定し、 1 アプリケーションに巨大な state ツリーを 1 つ持ちます。 これではコンポーネントからでも Redux が持つすべての state にアクセス出来ます。 グローバルな変数が使いやすいのは当たり前で、それが複雑化してくると急に影響範囲がわからなくなったり意図しない副作用に悩まされます。 そんな背景もありコンポーネント内に状態を持つ分割統治がトレンドになってきていて Recoil はこの

                      React 新しい状態管理ライブラリ Recoil の紹介
                    • Supabase + Next.jsで画像投稿アプリを作ってみた

                        Supabase + Next.jsで画像投稿アプリを作ってみた
                      • React License Violation

                        JSConfJP 2019 で使用したスライド (に次回の公演情報を追加したもの) です。 https://jsconf.jp/

                          React License Violation
                        • GitHub - remotion-dev/remotion: 🎥 Make videos programmatically with React

                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                            GitHub - remotion-dev/remotion: 🎥 Make videos programmatically with React
                          • hygen で生成 - 対話形式の Component 雛形 -

                            Component 作成にあたり、storybook や test も一度にコミットする場面が増えてきました。そして CSS Modules や、特定 Component 専用の custom hooks など、一つの Component を構成するファイル群はそれなりの量になってきます。例えば、以下の様な module 構成の Component です。これを手作業で作成するとなると、少し億劫になりますよね。 └── atoms └── Button ├── Button.stories.tsx ├── Button.test.tsx ├── Button.tsx ├── dependencies.ts ├── index.tsx └── style.module.css 作成時にButtonという名称だけ決めてしまい、CLI から雛形出力できれば、作業効率向上が見込めます。(story

                              hygen で生成 - 対話形式の Component 雛形 -
                            • Chakra UIの歩き方 & Tips集

                              Chakra UIに関するTips・レシピ集です。基本無料公開ですが、おまけのみ有料とさせていただいています。値段・有料部位等は変更する可能性があることをご留意ください

                                Chakra UIの歩き方 & Tips集
                              • react-router 作り方

                                history で自分だけの最強のルーターライブラリを作ろう! react-router は history というライブラリを内部で使用しています。ブラウザの history API の抽象化を提供するのが目的のライブラリです。 react-router v5 の API に useHistory というカスタムフックがあります(v6 から名前が変更されています)が、それはまさに history ライブラリの実体を取得するための関数になっています。 ルーティングに関する以下の処理は history ライブラリ内部で行われています。 現在の URL から Location オブジェクトを作成する 履歴の操作を行う 履歴の変更を検知してコールバックを実行する react-router は React 用のインターフェイスを提供しているに過ぎません。 つまり、 history をベースに Re

                                  react-router 作り方
                                • 今話題となっているReact 19のSuspenseの変更内容を詳しく見てみました。

                                  はじめに 以下のツイートが発端でした。 投稿者は、React Query のメインコントリビュータの tkdodo さんです。 React 19 に含まれる変更にある異変を気づきました。 変更は以下に該当します react: Don’t prerender siblings of suspended component #26380 リリースノートに隅っこにありました。 この変更は RFC なしで含まれました。該当 PR は以下 What React では、 Suspense を使って、非同期処理を行うコンポーネントやReact.lazyによってコンポーネントの遅延ロード時に、読み込みを完了するまでフォールバックを表示させることができます。 以下のような実装があるとします。 import { lazy, Suspense, useState } from "react"; const Av

                                    今話題となっているReact 19のSuspenseの変更内容を詳しく見てみました。
                                  • React + Typescript プロジェクトに Redux Toolkit を導入したので使い方をざっくりとまとめてみる | DevelopersIO

                                    React + Typescript プロジェクトに Redux Toolkit を導入したので使い方をざっくりとまとめてみる Redux を導入する際にネックとなるのが、State、Action、Selector、Reducer というそこそこの量のボイラープレートコードを記述しなければならないことです。可読性を考慮してそれぞれファイルを分けて記述するとフォルダ構成も考えないといけないので導入するハードルがそこそこ高いと個人的に感じていました。 今回 Redux Toolkit という Redux のヘルパーライブラリを使ってみて上記の悩みが解消されたので使い方をまとめてみました。 English Version of this article is also available : How to use Redux Toolkit for React + Typescript proj

                                      React + Typescript プロジェクトに Redux Toolkit を導入したので使い方をざっくりとまとめてみる | DevelopersIO
                                    • React の流儀 – React

                                      この記事は古くなっており、今後更新されません。新しい React 日本語ドキュメントである ja.react.dev をご利用ください。 新しいバージョンの React の流儀では、最新の React の使い方がライブサンプル付きで学べます。 巨大で軽快な Web アプリを開発する場合に、React は最高の手段であると、私たちは考えています。Facebook や Instagram といった私たちのサービスにおいても、とてもよくスケールしています。 React のすばらしい特長がいくつもありますが、あなたがどんなアプリを作ろうかと考えたことが、そのままアプリの作り方になる、というのはそのひとつです。本ドキュメントでは、検索可能な商品データ表を React で作っていく様子をお見せしましょう。 モックから始めよう すでに、JSON API が実装済みで、デザイナーからもデザインモックがもら

                                        React の流儀 – React
                                      • そのuseRef+useEffect、refコールバックのほうが良いかも? - Qiita

                                        Reactにおいて、useEffectのユースケースとして知られているのが、DOMノードに直接アクセスしなければいけない場合です。useRefでDOMノードをrefオブジェクトに取得し、エフェクト内からDOMノードにアクセスするというのがその場合の基本的なやり方です。 このようなuseRef + useEffect の使い方は、問題ない場合もありますが、実は別の手段を使った方がいい場合もあります。その場合に別の手段として適しているのがrefコールバックという機能です。 そこで、この記事ではどのような場合にuseRef + useEffectよりもrefコールバックが適しているのか、そしてrefコールバックを使う場合の注意点について解説します。 復習: refコールバックとは React DOMでは、組み込み要素(divなどHTMLの要素)に対してrefという特殊なpropを与えることができ

                                          そのuseRef+useEffect、refコールバックのほうが良いかも? - Qiita
                                        • Stitches — CSS-in-JS with near-zero runtime

                                          PerformantStitches avoids unnecessary prop interpolations at runtime, making it more performant than other styling libraries. Feature-richPacked full of useful features like theming, smart tokens, css prop, as prop, utils, and a fully-typed API.

                                            Stitches — CSS-in-JS with near-zero runtime
                                          • React Libraries To Use In 2023: 17 Top Picks

                                            Yash Tiwari for Coursesity Posted on Jun 13, 2021 • Updated on Mar 23, 2023 React is a JavaScript library that lets you create a prime UI for both mobile and web applications. It integrates seamlessly with other JavaScript frameworks and libraries and includes small, reusable pieces of code, called components. Due to their high modularity, React component libraries not only optimize UI development

                                              React Libraries To Use In 2023: 17 Top Picks
                                            • Next.js App Router Training

                                              Next.js App Router TrainingIntroducing various basic patterns of app router with simplified code.

                                                Next.js App Router Training
                                              • Reactの状態管理におけるuseReducerとuseContextの活用例

                                                こんにちは、アルダグラムでエンジニアをしている松田です。 Reactで状態を管理するにあたっては、useStateの利用が挙げられることが多いです。 実際、数値や文字列、真偽値などのプリミティブな値であれば、useStateが適切なケースが大半でしょう。 ただ、値を投入するだけではなく、追加・削除・更新といった操作が要求されるケースもあると思います。 その際に、配列やオブジェクトなどといった形式でデータを取り扱うことに併せて、useReducerやuseContextの利用も視野に入れると、開発手法の幅が広がります。 今回は、次の目標に掲げるUIを実現する過程を、useReducerとuseContextの活用方法の1つとしてご紹介します。 目標 以下のような操作ができるUIを作成する。 名前と年齢を入力して、ユーザーを作成 作成したユーザーは一覧に表示 各ユーザーの権限(一般 or 管理

                                                  Reactの状態管理におけるuseReducerとuseContextの活用例
                                                • How We Build Micro Frontends With Lattice

                                                  As we continue to grow here at Netflix, the needs of Revenue and Growth Engineering are rapidly evolving; and our tools must also evolve just as rapidly. The Revenue and Growth Tools (RGT) team decided to set off on a journey to build tools in an abstract manner to have solutions readily available within our organization. We identified common design patterns and architectures scattered across vari

                                                    How We Build Micro Frontends With Lattice
                                                  • Next.jsを使うべき5つの理由 + 実装Tips - Qiita

                                                    目次 Next.jsの概要 Next.jsを使うべき5つの理由 Next.jsを使う上での問題点と解決法 まとめ -1. 宣伝 本記事を元にしたNext.jsの入門書、『基礎から学ぶ Next.js』を出版いたしました! モダンJavaScript/TypeScriptの書き方からNext.jsの概要、さらに最新のReact 18/Next.js 13の内容までカバーしています。ハンズオンも豊富にあり、実際に手を動かしながらNext.jsでのアプリケーション開発を学べる内容になっています。 ハンズオンのコードは以下のリポジトリにあります。 0. TL;DR Next.jsはモダンかつ強力なフロントエンドフレームワークで、様々な長所を持っています。本稿の目的はそうしたポイントをご紹介し、Next.jsの利用を勧めることです。 1章ではまずNext.jsの概要について簡単にまとめます。 2章で

                                                      Next.jsを使うべき5つの理由 + 実装Tips - Qiita
                                                    • GitHub - PlasmoHQ/plasmo: 🧩 The Browser Extension Framework

                                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                        GitHub - PlasmoHQ/plasmo: 🧩 The Browser Extension Framework
                                                      • JavaScriptフロントエンドフレームワーク、Angularの人気が下落中

                                                        State of JavaScriptがこのほど、2019年におけるJavaScript関連の調査結果「The State of JavaScript 2019」を公開した。フロントエンドフレームワークとして注目されていたAngularだが、実際にはもう使わないと回答するユーザーの割合が2018年から増加しており、さらに今後学習するつもりもないと回答するユーザーの割合も多い。今後徐々に使用割合が減っていく可能性が見えてきている。 Angularユーザ意識割合推移グラフ - 資料: The State of JavaScript 一方、ReactとVue.jsは順調に使用率を伸ばしつつ、さらに今後学習していきたいというユーザーの割合も多い。今後、ReactとVue.jsはさらにユーザーが増える可能性がある。 Reactユーザ意識割合推移グラフ - 資料: The State of JavaS

                                                          JavaScriptフロントエンドフレームワーク、Angularの人気が下落中
                                                        • React hooksを基礎から理解する (useState編) - Qiita

                                                          React hooksとは React 16.8 で追加された新機能です。 クラスを書かなくても、 stateなどのReactの機能を、関数コンポーネントでシンプルに扱えるようになりました。 React hooksを基礎から理解する (useState編)  今ここ React hooksを基礎から理解する (useEffect編) React hooksを基礎から理解する (useContext編) React hooksを基礎から理解する (useReducer編) React hooksを基礎から理解する (useCallback編) React hooksを基礎から理解する (useMemo編) React hooksを基礎から理解する (useRef編) useStateとは useState()は、関数コンポーネントでstateを管理(stateの保持と更新)するためのReac

                                                            React hooksを基礎から理解する (useState編) - Qiita
                                                          • SSRはおまいらには早すぎた 〜Next.jsのgetServerSidePropsの登場が何を意味するか〜 - Qiita

                                                            概要 Next.js 9.3から getServerSideProps という仕組みが導入されました。 上記がそのドキュメントですが、これを読んで感動した私はつい語りたくなってしまいました、私情が多分に含まれております、ああそういう視点もあるんだくらいに見ていただければと思います。 僕自身は、SEOをあまり気にしないいわゆるSPAっぽいWebページのNext.jsでの開発を1年ちょいくらい業務でやっていて、今もNext.jsユーザーです。 「getServerSidePropsって何が良いの?なんで生まれたの?」 「なんでgetInitialPropsは非推奨なの?」 「Vercel製のSWRってライブラリあるけど、あれ何?」 「てかgetServerSidePropsとSWRって関係あるの?」 この辺の疑問をお持ちのNext.jsユーザーの方は是非ご一読ください。 ※過剰な煽りタイトルで

                                                              SSRはおまいらには早すぎた 〜Next.jsのgetServerSidePropsの登場が何を意味するか〜 - Qiita
                                                            • GitHub - rakkasjs/rakkasjs: Bleeding-edge React framework powered by Vite

                                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                GitHub - rakkasjs/rakkasjs: Bleeding-edge React framework powered by Vite
                                                              • JSXはspread演算子で<Foo a={a} b={b}>を<Foo {...{a, b}}>で書ける

                                                                JSXはspread演算子で<Foo a={a} b={b}>を<Foo {...{a, b}}>で書ける

                                                                  JSXはspread演算子で<Foo a={a} b={b}>を<Foo {...{a, b}}>で書ける
                                                                • Recoil Patterns: Hierarchic & Separation

                                                                  This article will discuss practical patterns in Recoil. It’s an advance topic that goes beyond Recoil basics, so we won’t spend time describing Recoil or its fundamentals concepts. If you’re not familiar with Recoil I suggest starting with the following sources: * Official Recoil YouTube * Recoil documentation This article is brought to you by WeKnow and represents insights gained during architect

                                                                    Recoil Patterns: Hierarchic & Separation
                                                                  • Redux or Not Redux 〜Reduxが不要かもと思ったら〜

                                                                    「Reduxって今必要なの?」という疑問に対して考える本

                                                                      Redux or Not Redux 〜Reduxが不要かもと思ったら〜
                                                                    • ReactのSuspenseListでお手軽CLS対策

                                                                      みなさん、React のConcurrent Mode使っていますか? まだという方もまだまだ遅くはありませんのでご安心ください。 この記事では、Concurrent Mode API の一つであるSuspenseListを使って、Core Web Vitalsの一つである Cumulative Layout Shift (CLS) の発生を抑制する方法を紹介します。 SuspenseList とは SuspenseList は React に組み込みのコンポーネントで、複数のSuspenseコンポーネントを子として持ち、それらが表示される順番を制御する機能を持ちます。Suspense についても一応復習しておくと、これは「内部でサスペンドしたコンポーネントがあった(=中身がまだ読み込み中である)場合は中身の代わりに指定されたフォールバックコンテンツを表示する」というコンポーネントであり、

                                                                        ReactのSuspenseListでお手軽CLS対策
                                                                      • How React server components work: an in-depth guide

                                                                        React server components (RSC) is an exciting new feature that will have huge implications on page load performance, bundle size, and how we write React applications in the near future. We at Plasmic make a visual builder for React, and we care a lot about React performance — many of our customers use Plasmic to build performance-critical marketing and e-commerce sites. And so, even though RSC is s

                                                                          How React server components work: an in-depth guide
                                                                        • GitHub - alewin/useWorker: ⚛️ useWorker() - A React Hook for Blocking-Free Background Tasks

                                                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                            GitHub - alewin/useWorker: ⚛️ useWorker() - A React Hook for Blocking-Free Background Tasks
                                                                          • GitHub - pmndrs/jotai: 👻 Primitive and flexible state management for React

                                                                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                              GitHub - pmndrs/jotai: 👻 Primitive and flexible state management for React
                                                                            • React Hooksの使い方を学ぼう~関数コンポーネントの状態管理を行う

                                                                              CodeZine編集部では、現場で活躍するデベロッパーをスターにするためのカンファレンス「Developers Summit」や、エンジニアの生きざまをブーストするためのイベント「Developers Boost」など、さまざまなカンファレンスを企画・運営しています。

                                                                                React Hooksの使い方を学ぼう~関数コンポーネントの状態管理を行う
                                                                              • A visual guide to React Mental models

                                                                                I’ve learned that the biggest difference between someone that has mastered a language, framework or tool and someone who hasn’t lies in the mental models they use. One person will have a clear and advanced one and the other will not. By having a good mental model you can intuitively understand complex problems and device solutions much faster than if you had to find a solution with a step-by-step

                                                                                  A visual guide to React Mental models
                                                                                • React's UI State Model vs Vanilla JavaScript DOM State — A Beginner's Introduction

                                                                                  This article is aimed at beginners who've never had the chance to see 'why React'. It takes a very contrived example to make a point about how React's declarative state model could help keep state sanity when code scales. If you're an experienced developer these series of posts by Steven might give deep insights about why declarative abstractions scale in a way you might not have thought before. T