From b794b6654689e740b720c81a7d3014b075011609 Mon Sep 17 00:00:00 2001 From: Maxim Zubarev Date: Fri, 22 Nov 2019 01:59:34 +0100 Subject: [PATCH] lodash optimization --- example/package.json | 2 +- example/src/components/companies.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/package.json b/example/package.json index 1b3811e..e0a9665 100644 --- a/example/package.json +++ b/example/package.json @@ -42,7 +42,7 @@ "start": "npm run develop", "serve": "gatsby serve", "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing \"", - "postinstall": "cd node_modules/console-feed && yarn && yarn build" + "postinstall": "cd ./node_modules/console-feed && yarn && yarn build" }, "repository": { "type": "git", diff --git a/example/src/components/companies.js b/example/src/components/companies.js index a1d82e4..d4b3b53 100644 --- a/example/src/components/companies.js +++ b/example/src/components/companies.js @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import styled from "styled-components"; -import _ from "lodash"; +import times from "lodash/times"; import Marquee, { Motion, randomIntFromInterval } from "react-marquee-slider"; import { withSize } from "react-sizeme"; import nanoid from "nanoid"; @@ -94,7 +94,7 @@ const Companies = ({ size }) => { - {_.times(8, Number).map(id => ( + {times(8, Number).map(id => (