0.1.1 • Published 2 years ago
shiv_not-found-page-1 v0.1.1
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.0Table 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-1Or if you prefer using Yarn:
$ yarn add shiv_not-found-page-1Usage
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 AppBuilt With
- ReactJS
- NodeJS
Versioning
- GitHub
- GitLab
Authors
- Shiv Shakti Bharti - Initial work - Shiv-git1https://github.com/Shiv-git1
License
ISC