"mounted" remains false after init
See original GitHub issueOn my project after initialization variable mounted
remains false
until we trigger some rerendering.
Because of this clicking to Arrows leads to instant (0s
) transition to destination point.
Unfortunately I can not reproduce this behavior on demo page (even by adding react-router).
I don’t know why mounter remains false
… but do we need this || !mounted
condition here?
export const innerStyle = ({ translate, dragging, mounted, transition }) => {
return {
...
transition: `transform ${dragging || !mounted ? '0' : transition}s`
};
};
Or, another question:
There is setMounted
function with variable initialized
which is used only in this function. What’s the reason of this variable? Also, setMounted
is calling in componentDidUpdate
only, shouldn’t we call it in componentDidMount
too?
My settings
<ScrollMenu
data={data}
arrowLeft={<Arrow type="prev" />}
arrowRight={<Arrow type="next" />}
onSelect={this.onSelect}
wheel={false}
alignCenter={false}
wrapperClass={style.sliderInner}
itemClass={style.sliderItem}
/>
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
FlutterError (setState() called after dispose(): (lifecycle state
Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree....
Read more >init fail to work when mounting /dev · Issue #14251 - GitHub
I doubt that just adding the /dev/init mount after the /dev:/dev mount will work for rootless. Is there any reason why the path...
Read more >Options: Lifecycle | Vue.js
A component is considered mounted after: All of its synchronous child components have been mounted (does not include async components or components inside ......
Read more >Lifecycle hooks - Angular
A component instance has a lifecycle that starts when Angular instantiates the component class and renders the component view along with its child...
Read more >How to fix boot failure due to incorrect fstab?
It seems that I've found a solution: At the GRUB prompt, hit A to append options. Add init=/bin/bash to the end of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, i published new version.
Works now. Thanks!