Skip to content

Accessing Configuration in Your Components

Tim Scott edited this page Aug 27, 2017 · 4 revisions

You can access React Devise config and also the AuthLinks component in your components by using withAuth like so:

import React from 'react';
import {withAuth} from 'react-devise';

const Home = ({auth: {AuthLinks}}) => {
  return (
    <div>
      <h1>My Page</h1>
      <AuthLinks />
    </div>
  );
};

export default withAuth(Home);

NEXT: Middleware for Clients >

Clone this wiki locally