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

trixion

v1.0.0

Published

Ultra light weight web stack bundle

Downloads

15

Readme

Trixion

Trixion is an ultra light modern web stack. its goal is to produce a very light bundle yet to support latest conventions.

** Trixion is still in beta stage - please use with care and submit any issue you encounter **

Read about Trixion in Medium

TL;TR

clone the trixion-starter project
and instead of any other dependency you may use (react, react-dom, redux, react-redux, react-router etc)
simply use trixion - its all in there. The whole thing weights ~15kb though (batteries included).

check out the examples

What's in it?

most of the functionality of react, redux, routing, hot-reload...

yet the only dependency is preact.
preact is baked in, so the only package you need is trixion.

  • Component based UI

    • createClass
    • es6 classes
    • functional component
    • object literal components (yes yes... its true)
  • state store

    • simple reducers declaration
    • scoped reducers (on sections of the state)
    • serializing/de-serializing state
    • reducers tree support
    • scoped subscription
    • store connectors with memoization (like reselect + redux-react)
    • persistent state middleware (with local/session storage)
  • html5 routing

    • nested routes
    • async component loading (optional loader)
    • lifecycle hooks
    • async lifecycle hooks!
    • pushing and replacing state without reload
  • some built in helpers

  • lean modern polyfills

But why?

Here is a small table that shows the bundle sizes of common boilerplate
projects for component based + routing + global state store frontend.

All bundles were made with NODE_ENV=production and -p flag for webpack.

Project | stargazers | minified | min+gzip :--- | :---: | ---: | ---: react-redux-universal-hot-example | 5713 | 561.3kb | 170.3kb react-redux-starter-kit | 3864 | 103.8kb | 38.9kb react-slingshot | 3262 | 210.4kb | 59.3kb react-isomorphic-starterkit | 1874 | 229.4kb | 66.8kb 28kb-react-redux-routing | 249 | 88kb | 25.9kb trixion | - | 56.8kb | 15kb

So, Why should I use it?

well, you don't...
Most people doesn't seem to care what their bundle size is.
But if any of these apply to you, then know that this project was built for people like you:

  • you care about your bundle size
  • you plan on building large app and understand that small core with lazy loading is the answer
  • you made performance tests and saw the huge impact of large bundles on mobile platforms
  • your DEV environment is too slow to build and reload
  • you're feeling like playing with something new

Lean web - Here We Come!

  • always be aware of your bundle size
  • as much lazy load as possible
  • check the size of each library you use - here are couple of methods

Not in the scope

Some features are not supported in trixion such as async store middlewares, state loggers,
redux related state players/manipulators and many more.

The reasons are:

  • Its still in early stages
  • more use cases usually means larger libs that increase bundle size for everyone
  • simplicity is a bless

docs

if you've never heard of react/preact, redux, redux-react, html5 routing
you are going to find it somewhat difficult to understand as trixion doesn't include the fundamental explanation.
Its recommended to read on each of the modules concepts and principles.

Resources

Exports

Here is a full list of the things that are exported from trixion (lots of them).

Components:
  • DOM
  • $
  • createElement - alias of $
  • E - alias of $
  • Component
  • createClass
  • render
  • findDOMNode
  • unmountComponentAtNode
  • h
  • preact
Store:
  • store
  • dispatch - alias of store
  • addReducer
  • connect - store connector
  • attachPersistence
  • attachSessionPersistence
Routing:
  • Router
  • Link
  • navigate
  • go
  • back
Misc:
  • app - any-purpose global namespace for your use
  • cl - className helper. see examples
  • assign - Object.assign like function
  • setImmediate
  • clearImmediate
  • DEBUG - true if process.env.NODE_ENV !== 'production'
  • parseUri - parse uri to pathname, search and hash

I want to help!

Contribution would be much appreciated.
Either by creating pull requests of opening issues.