antonio-ramadas/palbum

Refactor App.js

Ouverte

#7 ouverte le 12 mars 2019

 (0 commentaire) (0 réaction) (0 personne assignée)JavaScript (0 fork)auto 404
frontendgood first issue

Métriques du dépôt

Stars
 (9 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur