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

@tmraaex/simpleframework

v1.1.8

Published

A lightweight react framework made mostly for personal use but feel free to use it if it suits your needs

Readme

TmRAaEx Simple React Framework

Version: 1.1.6

This is a simple React framework primarily created for personal use, but feel free to use it if it suits your needs!


Changes:

  • Made rootLayout acctualy get passed to other routes. But now lyour nesting dosnt work. Work in progress

  • Now you can have a root layout and create layouts inside subfolders BUT it will replace the root layout for that folder

  • Now the default page file inside a folder an also be named "page" if that is prefered

  • Rootlayout works now but child layouts dont


Features

  • File-based routing: Automatically generate routes based on the file and folder structure.

⚠️ Important!

Vite Configuration

Make sure your vite.config.ts includes the following configuration:

// vite.config.ts
export default defineConfig({
  build: {
    target: "es2022", //or later
  },
  esbuild: {
    target: "es2022", //or later
  },
  optimizeDeps: {
    esbuildOptions: {
      target: "es2022", //or later
    },
  },
});

This is necessary to avoid the following error:

X [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)

Usage

Once the configuration is set up, you can use the framework in your React app like this:

// App.tsx
import { fileRouter } from "@tmraaex/simpleframework";
import "./app.css";
import { RouterProvider } from "react-router";

const App = () => {
  return (
    <div>
      <RouterProvider router={fileRouter} />
    </div>
  );
};

export default App;

File Naming Convention

Page Files

All "page files" must be placed inside the src/pages directory to be properly recognized. And be default export

Example:

// src/pages/index.tsx
export default function Home() {
  return <>Home page</>;
}

NOTE:

Because the router uses dynamic imports (import.meta.glob), your components are automatically discovered.

Some Editors or tools such as Typescript or Eslint might give a warning like Unused default export Home This can safely be ignored.


  • index.tsx: The default page file for a given folder. For example:

/src/pages/index.tsx will be displayed at http://yoursite.com/.

/src/pages/products/index.tsx will be the default page for the /products route.

  • Folder Structure:

You can create folders inside /src/pages to group multiple pages under the same root route. For example, you can have multiple pages inside /src/pages/products/.

  • layout File:

Note: this currently only works for "sub folders" inside /src/pages like /src/pages/dashboard working on fix for RootLayout

If you name a file layout.tsx, it will be treated as the layout component for that folder and used for all the nested pages.

  • Error file:

If you create /src/pages/error.tsx it will be used as the error page for all routes on your site. Recommended in production!

  • Slug Files:

If a file is named with square brackets (e.g., [yourSlug].tsx), it will be treated as a dynamic route (slug). The value of the slug can be retrieved using useParams() from react-router:

Example:

import { useParams } from "react-router";
const { yourSlug } = useParams();

Requirements

  • React (Vite)

  • react-router