Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
import ko from 'axe-core/locales/ko.json';
import React from 'react';
import { MemoryRouter } from 'react-router-dom';
import { GlobalStyle } from 'styles/GlobalStyle';

export const decorators = [
(Story) => (
<MemoryRouter>
<GlobalStyle />
<Story />
</MemoryRouter>
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정확히 Memory Router가 어떤 역할을 하는 지 궁금합니다. 🧐

Copy link
Contributor Author

@hhhyyo hhhyyo Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://v5.reactrouter.com/web/api/MemoryRouter
공식문서에서 메모리에 "URL"의 기록을 유지하는 Router입니다.(주소 표시줄을 읽거나 쓰지 않음). 테스트 및 React Native와 같은 비 브라우저 환경에서 유용합니다. 라고 적혀있습니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

];

export const parameters = {
a11y: {
Expand Down