antonio-ramadas/palbum

Refactor App.js

オープン

#7 opened on 2019/03/12

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (0 件のフォーク)auto 404
frontendgood first issue

Repository metrics

Stars
 (9 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド