기술 스택

언어 typescript

컴포넌트 문서화 storybook

프로젝트 구성 Next.js

디자인 프레임워크 Mui

상태관리 Context API

기타 개발 편의성 Eslint, Prettier, Comment Anchor(vscode extension)

컨벤션

네이밍

컴포넌트 작성 예시

// components/Test/index.ts
export { Test } from "./Test";

// components/Test/style.tsx
import styled from "@emotion/styled";

interface StyledTestProps {
  string: string;
}

export const StyledTest = styled.div<StyledTestProps>`
  background-color: ${({ string }) => (string ? "black" : "yellow")};
`;

// components/Test/Test.stories.tsx
import React from "react";
import { ComponentStory, ComponentMeta } from "@storybook/react";
import { Test } from ".";

export default {
  title: "components/Test",
  component: Test,
} as ComponentMeta<typeof Test>;

const Template: ComponentStory<typeof Test> = (args) => <Test {...args} />;

export const Default = Template.bind({});
Default.args = {};

// components/Test/Test.tsx
import * as S from "./style";

interface TestProps {
  string: string;
}

export const Test = ({ string }: TestProps) => {
  return <S.StyledTest string={string} />;
};

Eslint