Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navbarを共通コンポーネント化 #22

Open
yoidea opened this issue Nov 19, 2018 · 2 comments
Open

Navbarを共通コンポーネント化 #22

yoidea opened this issue Nov 19, 2018 · 2 comments

Comments

@yoidea
Copy link
Member

yoidea commented Nov 19, 2018

問題点

すべてのページに設置されているNavbarは各々のスクリーン内で定義されている。これではほぼ同じ内容のコードが何回も書かれており冗長た。

改善案

Navbarを共通コンポーネント化してヘルパーから呼び出すことにより、無駄のないコードに修正する。

const links = [
  {text: "link text", path: "path"},
  ...
]
<Navbar link={links} />
@yoidea
Copy link
Member Author

yoidea commented Nov 22, 2018

breadcrumbが一瞬で共通コンポーネント化できたのだから、容易なはずだ。
やる気を絞り出せ!

@arsley
Copy link
Member

arsley commented Nov 23, 2018

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants