react-nativeexpo-router

Multiple Drawer on Expo-Router


I want to create multiple drawers (from both the left and right sides) using Expo Router. I'm finding it difficult to implement multiple drawers using Expo Router because Expo Router and React Navigation are somewhat different. Has anyone successfully applied multiple drawers while using Expo Router? Thank you.

Previously, I successfully added multiple drawers to my project using React Navigation (https://reactnavigation.org/docs/multiple-drawers/). However, right now, I want to create a similar project using Expo Router.


Solution

  • I think I've found a solution. I'm not entirely sure if this is the best practice, but so far, this approach is working as I had hoped.

    I'm using the Drawer component from Expo Router for the Left Drawer. However, for the Right Drawer, I'm using the Drawer component from React Navigation Drawer. Since I'm only using the right drawer for the notification list, I believe there won't be conflicts between the two.