Prevent unnecessary re-renders

This commit is contained in:
Melvin Valster
2019-07-20 16:11:28 +02:00
parent 109955166d
commit eddb47e8b1
9 changed files with 174 additions and 111 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ export function parsePointString(str: string): List<List<number>> {
const list: Array<number[]> = []
const trees = str.split('-')
trees.map((stringForTree, index) => {
trees.forEach((stringForTree, index) => {
const points = stringForTree.split('').map(a => parseInt(a, 10))
list[index] = points
})