{"id":22546344,"url":"https://github.com/felixgirault/pure-render-decorator","last_synced_at":"2025-04-05T20:04:35.874Z","repository":{"id":32064364,"uuid":"35636195","full_name":"felixgirault/pure-render-decorator","owner":"felixgirault","description":"An ES7 decorator to make React components \"pure\".","archived":false,"fork":false,"pushed_at":"2016-11-01T19:19:33.000Z","size":21,"stargazers_count":189,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T19:02:13.322Z","etag":null,"topics":["es7-decorator","react"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felixgirault.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-14T20:50:12.000Z","updated_at":"2024-09-29T10:57:28.000Z","dependencies_parsed_at":"2022-09-10T23:12:42.965Z","dependency_job_id":null,"html_url":"https://github.com/felixgirault/pure-render-decorator","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixgirault%2Fpure-render-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixgirault%2Fpure-render-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixgirault%2Fpure-render-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixgirault%2Fpure-render-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felixgirault","download_url":"https://codeload.github.com/felixgirault/pure-render-decorator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246828470,"owners_count":20840473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es7-decorator","react"],"created_at":"2024-12-07T15:07:05.238Z","updated_at":"2025-04-05T20:04:35.849Z","avatar_url":"https://github.com/felixgirault.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pure render decorator\n=====================\n\nAn ES7 decorator to make React components \"pure\".\n\n[![Build Status](https://travis-ci.org/felixgirault/pure-render-decorator.svg?branch=master)](https://travis-ci.org/felixgirault/pure-render-decorator)\n\nAlternatives\n------------\n\n* As of [v15.3.0](https://github.com/facebook/react/releases/tag/v15.3.0), React provides a `PureComponent` base class to make a component pure.\n* [recompose](https://github.com/acdlite/recompose/blob/master/docs/API.md#pure) provides a clean and functional way to make components pure.\n\nInstallation\n------------\n\n```sh\nnpm install pure-render-decorator\n```\n\nUsage\n-----\n\n```jsx\nimport {Component} from 'react';\nimport pureRender from 'pure-render-decorator';\n\n@pureRender\nexport default class Test extends Component {\n  render() {\n    return \u003cdiv /\u003e;\n  }\n}\n```\n\nThe above example is the same as using `PureRenderMixin`:\n\n```jsx\nvar React = require('react');\nvar PureRenderMixin = require('react-addons-pure-render-mixin');\n\nvar Test = React.createClass({\n  mixins: [\n    PureRenderMixin\n  ],\n\n  render: function() {\n    return \u003cdiv\u003e\u003c/div\u003e;\n  }\n});\n```\n\nAs decorators are simply functions, you can also use `pureRender()` without the decorator syntax:\n\n```jsx\nimport {Component} from 'react';\nimport pureRender from 'pure-render-decorator';\n\nclass Test extends Component {\n  render() {\n    return \u003cdiv /\u003e;\n  }\n}\n\nexport default pureRender(Test);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixgirault%2Fpure-render-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixgirault%2Fpure-render-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixgirault%2Fpure-render-decorator/lists"}