I'm using https://reactnavigation.org/docs/intro/
I would like to add a switch, or toggle, into the draw - rather than a link to another page.
What I'd like to see, is the draw open - and then a toggle switch is displayed in replace of an option. The User should then be able to toggle that on and off without the draw closing.
Anyone know if this is possible?
U can use the contentComponent in DrawerNavigator to use a custom React component for the drawer.
contentComponent
can be a custom React class that u can write which consists of anything u want.Providing a custom contentComponent
You can easily override the default component used by react-navigation:
Refer: https://reactnavigation.org/docs/navigators/drawer
custom drawer example : https://developerlife.com/2017/04/15/navigation-and-styling-with-react-native/