antonio-ramadas/palbum

Refactor App.js

开放

#7 创建于 2019年3月12日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (0 个派生)auto 404
frontendgood first issue

仓库指标

星标
 (9 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

App.js is doing more than it should. It populates the page (search bar and table).

However, whenever there is an update to the list (e.g., a new album is added) the whole component is rendered. As you can guess, there is no need for it.

Also, with a refactor, the logic would no longer be on a single file and its size will most likely be reduced.

I suggest having one component for the search bar, another for the table and App.js simply calls them on the rendermethod.

贡献者指南