Skip to content

Commit

Permalink
fix a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
juangl authored Aug 30, 2019
1 parent e49fac7 commit c9b3517
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ class TruncatedComponent extends React.Component<
}, 0);
}

// this thing works by implementing something like a binary-serch through
// the tree to find the most amount of text to fits in the desired number
// this works using a binary-search across each level of the React tree
// to find the most amount of text that fits in the desired number
// of lines.
// We can think of a React tree as a structure where React.Node is the type
// of the node and it could have and array of children (`node.props.children`)
// and leaf nodes are usually are usually `string`.
// and leaf nodes are usually `string`.
onMeasure = (heightByParagraph: Array<number>) => {
const { numberOfLines, cacheKey } = this.props;
const { currentTree, previousTree, level, startOffset } = this.state;
Expand Down

1 comment on commit c9b3517

@vercel
Copy link

@vercel vercel bot commented on c9b3517 Aug 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.