shiv_not-found-page-1

0.1.1 • Public • Published

code style: prettier

Not Found Page

This is a simple not-found page that is built to be used with ReactJS

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
8.19.4
16.20.0

Table of contents

Getting Started

Just create a React app and start using this package with the installation commands

Installation

BEFORE YOU INSTALL: please read the prerequisites

Start with installing the package using npm:

npm install shiv_not-found-page-1

Or if you prefer using Yarn:

$ yarn add shiv_not-found-page-1

Usage

Serving the app

Options

props

Props Type Example
errorCode 'string' "403"
text 'string' "Forbidden"
backLink 'string' "/profile"
homeLink 'string' "/home"

If present, the request will be performed as soon as the component is mounted

Example:

import NotFound from shiv_not-found-page-1'

function App() {
  const notFoundObj = {
    errorCode: '501',
    text: 'Internal server error',
    backLink: '/',
    homeLink: '/',
  }

  return (
    <div className="App">
      <NotFound
        errorCode={notFoundObj.errorCode}
        text={notFoundObj.text}
        backLink={notFoundObj.backLink}
        homeLink={notFoundObj.homeLink}
      />
    </div>
  )
}

export default App

Built With

  • ReactJS
  • NodeJS

Versioning

  • GitHub
  • GitLab

Authors

License

ISC

Package Sidebar

Install

npm i shiv_not-found-page-1

Weekly Downloads

0

Version

0.1.1

License

ISC

Unpacked Size

8 kB

Total Files

5

Last publish

Collaborators

  • shivshakti7