@rndm/meta

0.1.0 • Public • Published

RNDM Meta

Introduction

RNDM Meta is a simple Higher Order Component (HOC) used to derive and update meta tags on demand. It has beenc reated so that it can easily be used as a cross platform solution for all the supported platforms in the React XP template, but can also be integrated with any other standard React project.

Installation

Make sure you have Node.js installed.

Then, to get started simply run the following command from your preferred terminal interface:

npm install --save @rndm/meta

Usage

The component is very easy to use and can wrap any other component. When wrapped, and mounted it will update the meta tags for Web React pages.

Example

import React from 'react';
import { View, Text } from 'react-native';
import WithMeta from '@rndm/meta';

const Page = () => (
  <WithMeta meta={{
    title: 'RNDM',
    author: 'RNDM, info@rndm.com',
    url: 'https://www.rndm.com',
    copyright: 'RNDM',
    description: 'Pioneers in open-source, cross-platform, low-code solutions',
  }}>
    <View style={{ height: '100%', backgroundColor: 'red' }}>
      <Text>Hello Meta!</Text>
    </View>
  </WithMeta>
);

export default Page;

Readme

Keywords

none

Package Sidebar

Install

npm i @rndm/meta

Weekly Downloads

2

Version

0.1.0

License

Apache-2.0

Unpacked Size

2.87 kB

Total Files

4

Last publish

Collaborators

  • paul.j.napier