{"repo":"sindresorhus/react-extras","free":true,"listed":false,"github":"https://github.com/sindresorhus/react-extras","clone":"git clone https://github.com/sindresorhus/react-extras.git","description":"Useful components and utilities for working with React","language":"JavaScript","stars":743,"topics":["react","react-component","react-utils","npm-package"],"license":"MIT","category":"ui-components","readme_excerpt":"react-extras Useful components and utilities for working with React Install Usage API autoBind(self, options?) Automatically binds your React.Component subclass methods to the instance. See the autoBind.react() docs. classNames(…input) Conditionally join CSS class names together. input Type: string object Accepts a combination of strings and objects. Only object keys with truthy values are included. Anything else is ignored. React component that renders the children if the condition prop is true . Beware that even though the children are not rendered when the condition is false , they're still evaluated. If you need it to not be evaluated on false , you can pass a function to the render prop that returns the children: Or you could just use plain JavaScript: React component similar to a switch case. has 2 children components: - that renders the children if the condition prop is true . - that renders the children if has no with true prop condition . Note that even when the children are not rendered, they're still evaluated. Or you could just use plain JavaScript: React component that iterates over the of prop and renders the render prop. Or you could just use plain JavaScript: React component that improves the element. It makes the image invisible if it fails to load instead of showing the default broken image icon. Optionally, specify a fallback image URL. It supports all the props that supports, but you use the prop url instead of src . Renderless React component that can add","default_branch":null,"files":null,"tree":[],"storefront":"/r/sindresorhus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sindresorhus/react-extras/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}