Skip to content

Instantly share code, notes, and snippets.

@antmdvs
Last active December 8, 2016 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antmdvs/c7c73b451e82951b059e8e8b5fcc52f0 to your computer and use it in GitHub Desktop.
Save antmdvs/c7c73b451e82951b059e8e8b5fcc52f0 to your computer and use it in GitHub Desktop.
React Component Selection Considerations

Footprint

  1. What’s the minified bundle size of the component/library?
  2. For a given component library, can we just import a single module if we only need that one component?

import { Component1 } from ‘widgets/libs/component1’;

instead of

import * as components from ‘widgets’;

Accessibility

Depending on Section 508 compliance requirements

  1. Does the component render to Semantic HTML? For example, a slider should emit an <input type=”range” /> element, not a <div/>
  2. Does it emit aria- attributes?

Customizability

  1. Is it open source?

Performance

  1. Especially important for organisms (e.g.: grid)
  2. Does it use any direct-DOM manipulation (jQuery, Zepto)
  3. Does it only repaint the parts that changed?

Maintainability

  1. Is it open source?

Volatility

  1. Is it pre-release? How much API churn is to be expected?

Support

  1. Is it from a big company?
  2. If OSS, how active is development? Do they have clearly defined roadmap or milestones?

Other

Controlled vs. Uncontrolled?

Server rendering?

@torresrobertoc
Copy link

torresrobertoc commented Dec 8, 2016

Here are my thoughts:

Accessibility

I would say that the level of accessibility that is designed into the component is dependent on whether Section 508 is being upheld. There should always be some level of accessibility at a minimum.

Maintainability

How many other libraries does the component require (if any)? Having to build on top of other libraries decreases the maintainability. For example multiple, overlapping style-sheets.

(NEW) Mobility

  1. Does the component accommodate a Responsive Web Design?
  2. Does the component support touch-enabled devices? Hover states for desktop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment