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-blazing

v0.0.1

Published

React Blazing The fatest Toolchain

Downloads

1

Readme

ultimate-react

React Blazing The fatest Toolchain

React 17 ready, including the New JSX transform

Table of Contents:

  1. Requirements
  2. Setup
  3. Features
  4. Routes
  5. Linting / code style
  6. Parcel (bundler) / Babel (compiler)
  7. React Features
  8. Styling
  9. Testing
  10. Deployment
  11. Additional Packages
  12. FAQ
  13. Roadmap

Requirements

Building and running on localhost

First install dependencies:

yarn install

This project uses yarn package manager but you can use npm instead

To run in hot module reloading mode:

yarn start

Open localhost:1234/ in your browser

To create a production build:

yarn build

It creates production-ready bundles that contain very little to no unused development code, ensuring your end-user gets fast load times. Output: /dist folder

To visualize the size of your final bundle:

yarn bundle_analyze

It creates two new folders ./build-report & ./parcel-bundle-reports and opens a page in your browser

Features

  • Aliases

.babelrc alias

      "alias": {
        "@app": "./src",
        "@components": "./src/components",
        "@pages": "./src/pages",
        "@hooks": "./src/hooks"
      }

Add new alias:

        //new alias example:
        "key: "path"
        "@helpers": ".src/lib/utils/helpers"

Usage:

//instead of importing:
import MyComponent from '../../../../../../../components/MyComponents';
// just use:
import MyComponent from '@components/MyComponent';
  • Code splitting

React Lazy

Parcel dynamic imports

Routes

React Router

@components/Routes

add new pages at @pages folder

Bundler / Compiler

Parcel: Blazing fast, zero configuration web application bundler

Babel Babel is a compiler for writing next generation JavaScript.

Linting / code style

Eslint (airbnb style)

Prettier

yarn format // run prettier on all /src js/jsx files
yarn format:check // check for unmatched prettier code style

React Features

React Lazy: Load different parts of the application only when they're needed (code-splitting)

Suspense: Display useful loading states

Context Api: Provides a way to pass data through the component tree without having to pass props down manually at every level

Hooks: Let you use state and other React features without writing a class component. In other words, Hooks are functions that let you “hook into” React state and lifecycle features from function components.

Styling

Sass / Less files are supported out of the box.

import './custom.scss';

can be imported at any scope:
//global (App.js) <- will be applied at everything, great for reseting css, defining color variables, importing sass/css libraries
//page example: (home/index) <- styles will be applied at /home but not at other pages
//component (MyComponent) <-

if you'd like an css in js approach:

recommended

Styled components (with Global Style)

import styled from 'styled-components';

const StyledContainer = styled.div`
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
`;

Deployment

Make sure your web server rewrites all requests to '/' since react is a SPA and we're using react-router to make multi pages available (client-side routing)

Vercel:

vercel deployment is supported vercel.json

// package.json scripts:
  yarn dev:vercel //vercel dev
  yarn preview //vercel
  yarn deploy //vercel --prod

Express:

app.get('/*', function (req, res) {
  res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});

Apache:

// .htaccess
    Options -MultiViews
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.html [QSA,L]

gh-pages

// package.json
  "homepage": "https://website.com",

Testing

To run unit tests:

yarn test

you can implement any test runners at this point

Additional Packages

Axios

dotenv

FAQ

what react-blazing is?

  • not a react framework like next, gatsby
  • not a react component library
  • not boilerplate
  • not a create-react-app abstraction

so what react-blazing is ? a complete react development toolchain

  • speed

  • implements the latest tools