### Install Package with npm Source: https://github.com/lomray-software/react-head-manager/blob/prod/README.md Installs the @lomray/react-head-manager package using npm, saving it as a production dependency. ```shell npm i --save @lomray/react-head-manager ``` -------------------------------- ### Basic Usage with Providers and Meta Component Source: https://github.com/lomray-software/react-head-manager/blob/prod/README.md Demonstrates the basic setup using MetaManagerProvider and ConsistentSuspenseProvider, and how to use the Meta component within a React component to manage head tags. ```typescript import { ConsistentSuspenseProvider } from '@lomray/consistent-suspense'; import { MetaManagerProvider, Manager, Meta } from '@lomray/react-head-manager'; const manager = new Manager(); /** * Root component container */ const App = ({ children }) => { const [state] = useState(); return ( {/** required, see warning above **/ ) } /** * Some component */ const MyComponent = () => { return ( <> Example
Some component....
) } ``` -------------------------------- ### Configure Tag Order via Manager Source: https://github.com/lomray-software/react-head-manager/blob/prod/README.md Shows how to configure the rendering order of specific head tags globally by setting definitions on the Manager instance before providing it. ```typescript /** * Way 1 */ const manager = new Manager(); manager.setTagsDefinitions({ title: 1, // change order for title tag "meta[name='viewport']": 2, // change order for meta viewport tag meta: 100, // change for all meta tags script: 200 // change for all script tags }); ``` -------------------------------- ### Configure Tag Order via data-order Attribute Source: https://github.com/lomray-software/react-head-manager/blob/prod/README.md Illustrates how to override the global tag order or set order for individual tags directly within the Meta component using the data-order attribute. ```typescript /** * Way 2 */ Example ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.