Questions tagged [unmount]
92 questions
3
votes
1 answer
useEffect clean up being called on mounting
I have a functional component react version is 17
export default function Comp(props){
.
.
.
useEffect(() => {
return () => {// cleanup
console.log("Called!")
}
}, [...dependiences])
}
I have another button that mounts…

Ahmed Gaafer
- 1,603
- 9
- 26
3
votes
2 answers
How remove or unmount React App from a website properly
In my website, i have a button to launch an react app in a specific div. When i click upon it, i create a react root div and render the react app inside.
What is the proper way to close it?
3
votes
4 answers
Mount and unmount hard drives
How can I mount and unmount hard drives (platform independent, so no using Runtime to execute a hard-coded command) in the Java Programming Language?
user238033
3
votes
1 answer
unmount event after changing a page
I have some code inside a component that detects if that component is visible on scroll. That code looks like:
constructor(props) {
super(props);
this.handleScrollAnimation = this.handleScrollAnimation.bind(this);
}
…

saunders
- 969
- 4
- 14
- 25
3
votes
1 answer
Can I "safely remove" a USB device from Android OTG, after writing files to it?
This regards Android Lollipop 5.0 and above only.
We have a custom device that can be mounted as a file system over USB. I've written an Android app that lets the user mount the device with OTG, after which we update files on the device. That part…

Bill Evans
- 71
- 6
3
votes
1 answer
Programmatically mounting USB storage on android 4.2.1
I've search and searched here, and no topics come close to answering the question.
Mounting and unmounting a USB stick from within a rooted APK. I've been successful in doing it from the command line via adb as follows:
prompt>> mount -t vfat -o rw…

user1762148
- 51
- 1
- 4
3
votes
1 answer
how to create a folder in sdcard programmatically that can be shown directly in windows and in the phone
I created an android application in which it creates a folder that stores data, but I want it to be shown right away in windows when the usb is connected. right now, it can only be seen after i restarted the mobile device or mount and unmounted the…

She Smile GM
- 1,322
- 1
- 11
- 33
2
votes
0 answers
Can we mount/unmount a device/disk/usb on Mac using Cocoa Swift?
I am trying to mount a device that was ejected/unmounted by this API
unmountAndEjectDevice(at:)
https://developer.apple.com/documentation/appkit/nsworkspace/1530469-unmountandejectdevice
but I am unable to find an API that can help me remount the…

Kamal Wadhwa
- 21
- 2
- 7
2
votes
0 answers
fuse takes too long time to mount /root/.cache/doc and /root/.cache/gvfs when I run any file manager as root
This is the case where I have Ubuntu 20.04 LTS Desktop 64-bit freshly installed and that I execute the command "sudo nautilus":
Unmounting and then deleting these directories unfortunately does not solve my problem because they are recreated the…

Mario Palumbo
- 693
- 8
- 32
2
votes
1 answer
How to unmount (close the mount) for sshfs Windows?
I've seen lots of posts dexcribing how to mount a remote directory on the local Windows machine using sshfs-win.
But I don't know how to close the mount (unmount), once I'm done?
I really appreciate your help.

Hossein
- 21
- 1
- 2
2
votes
1 answer
How to destroy screen on navigation.onback()
I'm using a stack navigator and on
navigation.goBack(null)}
I want to destroy current screen, I've seen other replacements like using .replace instead of .navigate but I want to do such thing on .goBack.

SAQ
- 55
- 10
2
votes
5 answers
how can I setState in unmount Component in React
How can we setState in componentDidMount hook within an argument?
My problem is the warning of React notify that:
Warning: Can't call setState (or forceUpdate) on an unmounted
component. This is a no-op, but it indicates a memory leak in your…

Thuan Nguyen
- 876
- 3
- 16
- 32
2
votes
1 answer
Don't unmount child if parent unmounts
I have a component that I want to render in a new browser window and I'm using roughly this technique: https://hackernoon.com/using-a-react-16-portal-to-do-something-cool-2a2d627b0202
This is a short extract of it:
class MyWindowPortal extends…

Crotaphytus
- 45
- 5
2
votes
1 answer
Unmounting SMB share folder
I mounted a SMB share folder under /mnt/smb/ and I can access the files. When I unmount this shared folder using command:
umount /mnt/smb/
naturally I cannot list shared folder contents using command:
ls /mnt/smb/
But the problem is when I run the…

Reza
- 179
- 1
- 5
- 12
2
votes
3 answers
ReactJS - setState error when unMounting and Mounting
I am new to React so I may not understand the correct concept of thinking.
I want to do auto update data component that can me mounted and unmounted.
This is a error that I get when I unmounted and then mounted component:
Warning: setState(...):…

Jan
- 167
- 2
- 5
- 16