npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bedrock-core/navigation

v0.9.3

Published

@bedrock-core/ui navigation system

Readme

@bedrock-core/navigation

Logo

Stack-based navigation for @bedrock-core/ui, inspired by React Navigation and adapted to the runtime's one-render-per-player model. Screens are components, transitions are actions, and route params are typed by a route map you declare once.

⚠️ MVP scope: stack navigation only. No tabs, nested navigators, deep linking, state persistence, transition animations, or keep-alive for inactive routes.

Install

yarn add @bedrock-core/navigation

It also ships inside the umbrella package as @bedrock-core/ui/navigation.

What it gives you

  • NavigationContainer — the provider that holds a player's navigation state; the root you pass to render()
  • createStackNavigator(config) — returns { Navigator, routeNames, initialRouteName } from a { screens, initialRouteName? } config; a screen entry is a component or { screen, initialParams }
  • useNavigation()navigate, push, goBack, canGoBack, reset, setParams, getState
  • useRoute() — the active { key, name, params }
  • stackReducer with its StackAction union and ScreenDefaults map, for hosts that seed or drive the stack themselves (@bedrock-core/config builds an initial state from a fired command this way)

Usage

/** @jsxImportSource @bedrock-core/ui */
import { NavigationContainer, createStackNavigator, type ScreenProps } from '@bedrock-core/navigation';
import { Button, Text, render, type JSX } from '@bedrock-core/ui';
import type { Player } from '@minecraft/server';

type AppRoutes = { Home: undefined; Profile: { userId: number } };

function HomeScreen({ navigation }: ScreenProps<AppRoutes, 'Home'>): JSX.Element {
  return (
    <Button onPress={(): void => navigation.navigate('Profile', { userId: 42 })}>
      <Text>{'Go to Profile'}</Text>
    </Button>
  );
}

function ProfileScreen({ navigation, route }: ScreenProps<AppRoutes, 'Profile'>): JSX.Element {
  return (
    <>
      <Text>{`Profile: ${route.params.userId}`}</Text>
      <Button onPress={(): void => navigation.goBack()}>
        <Text>{'Back'}</Text>
      </Button>
    </>
  );
}

const Stack = createStackNavigator<AppRoutes>({
  initialRouteName: 'Home',
  screens: { Home: HomeScreen, Profile: { screen: ProfileScreen, initialParams: { userId: 0 } } },
});

export function openApp(player: Player): void {
  render(
    <NavigationContainer>
      <Stack.Navigator />
    </NavigationContainer>,
    player,
  );
}

One render() per player. Navigating does not call render() again — button callbacks feed the runtime's existing present cycle, which re-presents the same screen with the new route. Screen components must never call render() themselves.

Documentation

License

MIT