1.0.5 • Published 5 years ago

react-www-redirect v1.0.5

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

React-www-redirect

⚠️ Security note ⚠️ - This element provides a client-side option when server-enforced www redirects are not possible. Please don’t use this if you can configure the server.

The element redirects the current page of your React Application to www, unless the page is loaded from a web server that is running on localhost.

Installation

Using npm:

npm install --save react-www-redirect

Update your index.js file as below:

import WWWRedirect from 'react-www-redirect';

// you can just wrap your entire app to redirect it to the equivalent www version
// for example:
// http://example.com/    =>    http://www.example.com/

// you can also use a "disabled" prop to dinamically disable it
// <WWWRedirect disabled={...}>

class WWWApp extends React.Component {

  render() {
    return (
      <WWWRedirect>
        <App />
      <WWWRedirect/>
    );
  }
}

Author

Shahin Alam

github/sopnopriyo

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago