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.
- 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 |
- 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. |
router5 - Router as state seems to allow a lot of flexibility (cancel routes) etc
Alternative | Comments |
---|---|
react-router | The most popular router |
react-dates - Airbnb's datepicker react-select - Good select component downshift - To build your own autoselect
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 |
react-spring - Combines features of react-motion and react-spring pose - Simple animations anime - Animates css, svg or dom props
- parceljs - Fast re-builds
Alternative | Comments |
---|---|
webpack | More complex, slower, but is a bit more established |
- jsonwebtoken - The auth0 version of JWT
- http-proxy-middleware - Good wrapper of http-proxy
- codesandbox.io - Online ide
- npms.io - alternative NPM search
- sweet-scroll - Scroll around
- split - Split a div
-
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 |
- yargs - Command line. Some alternatives
- sheetjs - npm i xlsx - Partially open source excel read/write
- exceljs - Read/write excel with more options such as colors
- canvas datagrid - Tested with 100k recs and is a fast web component
- handsontable - Free for evaluation and personal use but not OS
- component-playground - Show component for live editing