@hike_/react-redirection

1.0.0 • Public • Published

React-Redirection 🚀

Redirection is a plugin in wordpress that handles redirects.

This package is for handling redirects using a headless wordpress template.

How to use.

You can use the packages by importing {Link} from "react-redirection"

It's a React component, so you can just pass down the things you need as a prop.

import { Link } from '@hike/react-redirection'

const App = (data) => (
  <Link
    uri={data?.uri}
    url={data?.url}
    title={data?.title}
    target={data?.target}
  >
    Link
  </Link>
)

export default App

Features

Currently we support:

  • [x] URI redirects (default).
  • [x] Regex redirects.

Up and coming:

  • [ ] Server name redirects.(from gohike.eu to gohike.nl/en)
  • [ ] URL and language (Redirects)
  • [ ] 404 (Response)
  • [ ] URL and header (Redirect)
  • [ ] HTTP codes (Response)

Never going to be supported:

  • Redirect to random post

  • URL and cookie

  • URL and user agent

  • URL and login status

  • URL and referrer

  • URL and IP

  • URL and custom filter

Readme

Keywords

none

Package Sidebar

Install

npm i @hike_/react-redirection

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

80.7 kB

Total Files

6

Last publish

Collaborators

  • giotje