EvanBacon / expo-router-top-tabs

experimental
MIT License
50 stars 10 forks source link

Will there be an update to support Expo router V2? #7

Open vinodsptharsha opened 1 year ago

vinodsptharsha commented 1 year ago

Currently, the package requires Expo router V1.5 and Expo router V2 released and is stable. I am desperate for TopTab support with the expo router. Are you going to update this package to support V2?

BG687 commented 1 year ago

Yes - this would be awesome

BoavistaLudwig commented 1 year ago

@vinodsptharsha What issue do you have with Expo Router V2?

RobertUpchurch commented 1 year ago

I am able to use this with V2 but do get a decent amount of warnings as its dependencies are outdated

vinodsptharsha commented 1 year ago

@BoavistaLudwig Unable to install as dependencies are outdated.

enkemande commented 1 year ago

You can setup top tab for expo router v2 like so.

import { withLayoutContext } from "expo-router";

const Tab = createMaterialTopTabNavigator();

const { Navigator } = createMaterialTopTabNavigator();

export const TopTab = withLayoutContext(Navigator);

and then export and use it in your layout like you would use Stack navigation from expo router

import React from "react";
import { TopTab } from "../../../layouts/TopTab";

const Layout = () => {
  return <TopTab />;
};

export default Layout;
pencilcheck commented 8 months ago

the example given is for material top tab, how about expo-router-top-tabs?

Aftab3gamersden commented 6 months ago

How can I make the Top Tab Scroll upwards whenever I scroll up on the screen.

For example: The YouTube Channel Screen has a header, then below it a similar Top Tab Navigation Bar and then below the bar the content according to the tab of Top Tab Nav. When u scroll on that screen the content and the top tab and the header all move up

Aftab3gamersden commented 6 months ago

How can I make the Top Tab Scroll upwards whenever I scroll up on the screen.

For example: The YouTube Channel Screen has a header, then below it a similar Top Tab Navigation Bar and then below the bar the content according to the tab of Top Tab Nav. When u scroll on that screen the content and the top tab and the header all move up