Getting Started: React Essentials | Next.js
React Server Components は、サーバーとクライアントを活用したハイブリッドアプリケーション構築のための新しいメンタルモデル
- JavaScript バンドルのサイズ削減
- async コンポーネントを使える
Getting Started: React Essentials | Next.js
React Server Components は、サーバーとクライアントを活用したハイブリッドアプリケーション構築のための新しいメンタルモデル
// 一番シンプルな例 | |
const input = [1, 2, 3, 4]; | |
const output = input.reduce((prev, current) => { | |
return prev + current; | |
}); | |
console.log(output); // 10 |
import { Tab } from "@headlessui/react"; | |
import type { VFC } from "react"; | |
import { Fragment } from "react"; | |
type Props = { | |
items: { label: string; content: JSX.Element }[]; | |
}; | |
export const HorizontalTab: VFC<Props> = (props) => { | |
return ( |
import { AnyFramework, ComponentTitle, StoryAnnotations } from '@storybook/csf' | |
import { ComponentMeta, ComponentStory } from '@storybook/react' | |
import { VFC } from 'react' | |
export const createStorybookFactory = <P extends object>(Component: VFC<P>) => { | |
const Template = ((args) => <Component {...args} />) as ComponentStory< | |
typeof Component | |
> | |
const Default = Template.bind({}) |