{"name":"react-document-title","version":"2.0.3","description":"A declarative, nested, stateful document.title for React","main":"index.js","scripts":{"test":"mocha","test:watch":"npm run test -- --watch","lint":"jshint index.js test"},"repository":{"type":"git","url":"git+https://github.com/gaearon/react-document-title.git"},"keywords":["react","component","react-component","document.title","title","jsx"],"author":{"name":"Dan Abramov","email":"dan.abramov@me.com","url":"http://github.com/gaearon"},"license":"MIT","bugs":{"url":"https://github.com/gaearon/react-document-title/issues"},"homepage":"https://github.com/gaearon/react-document-title","devDependencies":{"create-react-class":"^15.5.2","expect.js":"^0.3.1","global":"^4.3.0","jsdom":"^9.12.0","jshint":"^2.5.6","mocha":"^2.0.1","mocha-jsdom":"^1.1.0","react":"^15.5.4","react-dom":"^15.5.4"},"dependencies":{"prop-types":"^15.5.6","react-side-effect":"^1.0.2"},"gitHead":"47d8ce54bcc5049e61b65df393c0eb96ddeb9f80","_id":"react-document-title@2.0.3","_shasum":"bbf922a0d71412fc948245e4283b2412df70f2b9","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"gaearon","email":"dan.abramov@gmail.com"},"dist":{"shasum":"bbf922a0d71412fc948245e4283b2412df70f2b9","tarball":"http://registry-npm.ywwl.com/react-document-title/download/react-document-title-2.0.3.tgz","integrity":"sha512-T5y+quDAybtD7JhvVyc2BDW3a9xj6MoW6/VZU6OJkbASqwEMo5G4nB0RqFJCEHOqjQMcQI+wGRPDhUADnaHlQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJUp2xl5cGFNaORE+TstgVOoqaAsTUXRTX9g6q2EK0OgIgI1tkkUbfyiv3oT6txlT5xQjSo5z1vH+HOJP8bFA0WaM="}],"size":5106,"noattachment":false,"key":"/react-document-title/-/react-document-title-2.0.3.tgz"},"maintainers":[{"name":"buzinas","email":"buzinas@buzinas.com"},{"name":"gaearon","email":"dan.abramov@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/react-document-title-2.0.3.tgz_1492005204833_0.05060060415416956"},"directories":{},"readme":"React Document Title\n====================\n\nProvides a declarative way to specify `document.title` in a single-page app.  \nThis component can be used on server side as well.\n\nBuilt with [React Side Effect](https://github.com/gaearon/react-side-effect).\n\n====================\n\n## Installation\n\n```\nnpm install --save react-document-title\n```\n\nDependencies: React >= 0.13.0\n\n## Features\n\n* Does not emit DOM, not even a `<noscript>`;\n* Like a normal React compoment, can use its parent's `props` and `state`;\n* Can be defined in many places throughout the application;\n* Supports arbitrary levels of nesting, so you can define app-wide and page-specific titles;\n* Works just as well with isomorphic apps.\n\n## Example\n\nAssuming you use something like [react-router](https://github.com/rackt/react-router):\n\n```javascript\nvar App = React.createClass({\n  render: function () {\n    // Use \"My Web App\" if no child overrides this\n    return (\n      <DocumentTitle title='My Web App'>\n        <this.props.activeRouteHandler />\n      </DocumentTitle>\n    );\n  }\n});\n\nvar HomePage = React.createClass({\n  render: function () {\n    // Use \"Home\" while this component is mounted\n    return (\n      <DocumentTitle title='Home'>\n        <h1>Home, sweet home.</h1>\n      </DocumentTitle>\n    );\n  }\n});\n\nvar NewArticlePage = React.createClass({\n  mixins: [LinkStateMixin],\n\n  render: function () {\n    // Update using value from state while this component is mounted\n    return (\n      <DocumentTitle title={this.state.title || 'Untitled'}>\n        <div>\n          <h1>New Article</h1>\n          <input valueLink={this.linkState('title')} />\n        </div>\n      </DocumentTitle>\n    );\n  }\n});\n```\n\n## Server Usage\n\nIf you use it on server, call `DocumentTitle.rewind()` **after rendering components to string** to retrieve the title given to the innermost `DocumentTitle`. You can then embed this title into HTML page template.\n\nBecause this component keeps track of mounted instances, **you have to make sure to call `rewind` on server**, or you'll get a memory leak.\n\n## But What About Meta Tags?\n\nLooking for something more powerful? Check out [React Helmet](https://github.com/nfl/react-helmet)!\n","publish_time":1492005205388,"_cnpm_publish_time":1492005205388,"dist-tags":{"latest":"2.0.3"}}