Skip to content

A curated list of delightful js packages and resources.

Notifications You must be signed in to change notification settings

alexanderchan/awesome-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome js Awesome

A curated and slightly opinionated list of delightful js. Some other libraries I've used or considered and why I've chosen one over the other 🤷. Alternatives are all excellent and may fit one's use case.

Inspired by the awesome list thing.

React

CSS in JS

  • emotion - Fast css in js by updating classes over direct styling
Alternative Comments
glamourous see message. Could consider for react-native
styled-components emotion has api inspired by both glamourous and styled-components

React - State management

  • unstated - Simple state management. As much as I enjoy mobx and learnt a lot from redux, unstated has a simple api to understand. One only needs to know: pub/sub and this.setState. Regardless of state management library choice, it is worth watching the free courses on egghead on mobx and redux as well as Michel Westrate's talk.
Alternative Comments
mobx Slightly higher learning curve and a bit more setup if using decorators. If perf gets slow, try mobx
redux More setup, probably better for a larger app but mobx should also handle the same cases. Use with immerjs
RxJs Observables are outstanding at managing complex async actions. I tried using acdlite's but didn't work out. If going down the rxjs route also consider redux-observable
apollo-link-state Local state management using graphql. It still seems like a good idea to have all global state changes pass through a central store so that the same changes occur at the same place. Somehow writing to the cache doesn't feel natural yet (although conceptually it's similar to setState and you could really think of cache as a store so it's not as scary). Maybe after working with more mutations/queries I'll feel better about this.

Routing

router5 - Router as state seems to allow a lot of flexibility (cancel routes) etc

Alternative Comments
react-router The most popular router

Useful components

react-dates - Airbnb's datepicker react-select - Good select component downshift - To build your own autoselect

Graphql

apollo - Apollo has a very wide set of tools for graphql from client to server

Alternative Comments
urql urql has a nice implementation of provider/queries. Apollo 2.x borrowed a lot from this api and apollo has some more useful utilities like persistent and client state as well as browser dev tools

Animation

react-spring - Combines features of react-motion and react-spring pose - Simple animations anime - Animates css, svg or dom props

Good articles

Packaging

Alternative Comments
webpack More complex, slower, but is a bit more established

Server

Web tools

DOM Things

Utils

  • lodash - General purpose util library

    • just - Smaller versions of the utils in lodash
  • arrify - Turn anything into an array ⭐

  • entities - encode/decode entities

    Alternative Comments
    qs querystring only available on node and some of the qs implementations not as maintained
  • shortid - short ids instead of uuid

  • date-fns - Date functions

Alternative Comments
moment larger library if including all locals and some performance concerns

Command line

Work

  • sheetjs - npm i xlsx - Partially open source excel read/write
  • exceljs - Read/write excel with more options such as colors

Data tables

A good list of grids

Documentation

License

CC0

About

A curated list of delightful js packages and resources.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published