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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-edge

v0.1.50

Published

React Edge is a modern, high-performance web framework designed for building server-side rendered (SSR) applications with React. It leverages Cloudflare Workers for edge computing capabilities and provides a robust set of tools for developing, testing, an

Downloads

1,917

Readme

React Edge Framework

React Edge is a modern, high-performance web framework designed for building server-side rendered (SSR) applications with React. It leverages Cloudflare Workers for edge computing capabilities and provides a robust set of tools for developing, testing, and deploying web applications.

Getting Started

Installation

npm install react-edge

Key Components

App

The App namespace provides types and interfaces for defining your application structure, including routes and server-side props.

Router Groups

Router groups allow you to:

  1. Group related routes under a common path prefix.
  2. Share common logic or data fetching for all routes within the group.
  3. Organize your routes more efficiently, especially for larger applications.

Benefits of using router groups:

  • Code Organization: Keep related routes together, making your routing structure more readable and maintainable.
  • Nested Routing: Easily create nested route structures, which is particularly useful for complex applications.

Worker

The Worker namespace contains classes and utilities for handling requests, authentication, caching, and more.

CLI Commands

X Framework provides a set of CLI commands to help you develop, build, and deploy your application. Here are the available commands and their options:

General Command

yarn edge --help

Commands:
  edge build       Builds project
  edge dev         Starts a development server
  edge deploy      Deploys the project
  edge logs        Shows logs for the project
  edge lint        Run prettier and eslint
  edge test        Runs tests
  edge type-check  Runs type checking
Options:
  -h, --help             Show help                                     [boolean]
      --vite-config-dir  The directory where the Vite config file is located
                                                     [string] [default: ".vite"]
      --ts-config-dir    The directory where the tsconfig file is located
                                                 [string] [default: ".tsconfig"]
      --version          Show version number                           [boolean]

Development Server

yarn edge dev --help
Starts a development server
Options:
  -h, --help             Show help                                     [boolean]
      --vite-config-dir  The directory where the Vite config file is located
                                                     [string] [default: ".vite"]
      --ts-config-dir    The directory where the tsconfig file is located
                                                 [string] [default: ".tsconfig"]
      --version          Show version number                           [boolean]
      --app              Run the development server for the app only   [boolean]
      --env              The Cloudflare Workers environment to target   [string]
      --remote           Run the development server remotely           [boolean]
      --worker           Run the development server for the worker only[boolean]

Build

yarn edge build --help
Builds project
Options:
  -h, --help             Show help                                     [boolean]
      --vite-config-dir  The directory where the Vite config file is located
                                                     [string] [default: ".vite"]
      --ts-config-dir    The directory where the tsconfig file is located
                                                 [string] [default: ".tsconfig"]
      --version          Show version number                           [boolean]
      --app              Build the app only                            [boolean]
      --env              The Cloudflare Workers environment to target   [string]
      --mode             The mode to build the project in
                                 [string] [choices: "development", "production"]
      --worker           Build the worker only                         [boolean]

These CLI commands provide a convenient way to manage your X Framework project throughout its lifecycle, from development to deployment.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.