antonio-ramadas/palbum

Refactor App.js

Aberta

#7 aberto em 12 de mar. de 2019

 (0 comentário) (0 reação) (0 responsável)JavaScript (0 fork)auto 404
frontendgood first issue

Métricas do repositório

Stars
 (9 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador