antonio-ramadas/palbum

Refactor App.js

開放

#7 建立於 2019年3月12日

 (0 則留言) (0 個反應) (0 位負責人)JavaScript (0 個分叉)auto 404
frontendgood first issue

倉庫指標

星標
 (9 顆星)
PR 合併指標
 (30 天內沒有已合併 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.

貢獻者指南