Skip to content

Commit

Permalink
lodash optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmzb committed Nov 22, 2019
1 parent be3bad5 commit b794b66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions example/src/components/companies.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -94,7 +94,7 @@ const Companies = ({ size }) => {
<FullWidth>
<Height height={500}>
<Marquee key={key} velocity={12} scatterRandomly minScale={0.7} resetAfterTries={200} debug>
{_.times(8, Number).map(id => (
{times(8, Number).map(id => (
<Motion
key={`marquee-example-company-${id}`}
initDeg={randomIntFromInterval(0, 360)}
Expand Down

0 comments on commit b794b66

Please sign in to comment.