# Components

Components are used to encapsulate common UI widgets used throughout the site. This includes things like comments, tag
lists, post thumbnails, paginators, and other things used repeatedly throughout the site. Components encapsulate a
widget's HTML, CSS, and Javascript together so that all the code for a component is in a single place.

This uses the [ViewComponent](https://github.com/github/view_component) library.

Components are similar in concept to React components.

# See also

* [app/views](../views)
* [app/javascript](../javascript)
* [test/components](../../test/components)

# External links

* https://viewcomponent.org
* https://github.com/github/view_component
* https://github.blog/2020-12-15-encapsulating-ruby-on-rails-views/