Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clamp does not rerender on state change #47

Open
Jaikant opened this issue May 8, 2019 · 1 comment
Open

Clamp does not rerender on state change #47

Jaikant opened this issue May 8, 2019 · 1 comment

Comments

@Jaikant
Copy link

Jaikant commented May 8, 2019

I am passing the number of lines to clamp which is stateful. Clamp does not rerender when the state changes

  const [ lines, setLines ] = useState(3);
  return (
      <Dotdotdot clamp={lines}>
          <Bio onClick={() => setLines(ln => (ln === 3 ? 0 : 3))}>
             {bio}
          </Bio>
      </Dotdotdot>
@MaxMusin
Copy link

MaxMusin commented Apr 8, 2021

Same issue... Someone found a solution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants