question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set isVisible manually via props

See original GitHub issue

I have a need to reset isVisible value manually via props. The reason I need it is because I am using active: false option, which means auto check of visibility is disabled. The logical consequence of that is an element doesn’t get a signal when its hidden and once it becomes visible again it “thinks” it is already visible and doesn’t triggers the onChange callback.

I will send you a pull request in a bit.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kofcommented, Mar 30, 2016

that PR is all I needed to solve my issues.

0reactions
joshwnjcommented, Mar 30, 2016

@kof is this resolve in v3.0.1 or are there still outstanding issues?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I pass the "isVisibility" value as a prop to another ...
I would recommend moving isVisible into HomePage which would allow you to pass it to both components. You can then update isVisible by ......
Read more >
Update on Async Rendering
The new static getDerivedStateFromProps lifecycle is invoked after a component is instantiated as well as before it is re-rendered. It can ...
Read more >
React Native Modal
The isVisible prop is the only prop you'll really need to make the modal work: you should control this prop value by saving...
Read more >
Controlling component visibility with React Hooks
import React, { useState } from "react"; export const Alert = ({ visible, duration, onDurationEnd, children }) => { const [isVisible, ...
Read more >
The React Handbook – Learn React for Beginners
and any other method in this class can reference the props using this.props . Props can be used to set the internal state...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found