Rakha112 / react-native-animation

https://youtube.com/@rakhawibowo
299 stars 89 forks source link

custom drawer2 #2

Closed Torstentjh closed 4 months ago

Torstentjh commented 5 months ago

hello,I am a newbie in react native. I watched your video tutorial of drawer and encountered a problem. I used the react native navigation library and nested the home page into the bottom-tab navigation. Then I followed your video and it only reduced the size of this component, not the entire content of the screen. I read the documentation of this library but didn't find a solution. Do you have a good solution? 😭

Rakha112 commented 5 months ago

Hey @Torstentjh, could you send a screenshot of the error you're experiencing or create a repro on Expo Snack or a GitHub repo ?

Torstentjh commented 4 months ago

Hey @Torstentjh, could you send a screenshot of the error you're experiencing or create a repro on Expo Snack or a GitHub repo ?

thanks a lot ,Actually, this is not an error. My homepage is displayed as a routed interface. The implementation of the react native navigation library caused this problem, so I set the bottom Tabbar height to 0 when I click it. It looks similar. Although this is stupid, it can meet my needs. I don’t need to solve this problem for the time being. Thank you image like this,i set height when i click and show drawer,it works ,although it stupid🤣

Rakha112 commented 4 months ago

Hey, I'm really sorry for my late response. Is this the bug you're experiencing when using nested navigators with bottom tabs ?

https://github.com/Rakha112/react-native-animation/assets/61527649/e81c114b-f18f-4f12-9ec7-d60401356a9e

If so, you can move the Drawer to your BottomTabsNavigator

https://github.com/Rakha112/react-native-animation/assets/61527649/2e45540b-942e-4bbc-a04d-7e8eedaa5764

Rakha112 commented 4 months ago

Here's a Snack you can try https://snack.expo.dev/@rakha112/drawer-bottom-tabs. I will close this issue, but if you still have the bug, feel free to reopen this issue or create a new one. Thank you