{"library":"react-title-component","title":"React Title Component","description":"A React component for nested document title management, allowing parent and child components to collaboratively build the document title. Version 1.0.1 is the latest stable release; no active development or major updates have occurred since its initial release. It supports both CommonJS and ES6 modules, works with React Router for route-driven titles, and provides server-side rendering support via a flushTitle() function. Unlike simpler solutions, it handles dynamic title composition from deeply nested components without requiring manual string concatenation or context propagation.","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install react-title-component"],"cli":null},"imports":["import Title from 'react-title-component'","import { flushTitle } from 'react-title-component'","const ReactTitle = require('react-title-component'); const Title = ReactTitle.default; const flushTitle = ReactTitle.flushTitle;"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import React from 'react';\nimport { render } from 'react-dom';\nimport Title, { flushTitle } from 'react-title-component';\n\nconst App = () => (\n  <div>\n    <Title render=\"Home\" />\n    <Inner />\n  </div>\n);\n\nconst Inner = () => (\n  <div>\n    <Title render={prev => `${prev} - Dashboard`} />\n  </div>\n);\n\n// For server-side rendering:\nconst html = renderToString(<App />);\nconst title = flushTitle();\nconsole.log(title); // \"Home - Dashboard\"","lang":"typescript","description":"Demonstrates nested Title components composing the document title dynamically, and server-side flushing.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}