0.1.1 • Published 2 years ago

shiv_not-found-page-1 v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

PropsTypeExample
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