feather-client-react

0.0.27 • Public • Published

feather-client-react

NPM JavaScript Style Guide

This library provides a fully-featured authentication form (sign-in, sign-up, and password-resets) as a single React component. Under the hood, this library wraps the feather-client-js library. If you like to build your own custom authentication forms, please checkout that library as well.

Have any questions? We're hanging out on Discord 👋

Install

$ npm install feather-client-react --save
# or
$ yarn add feather-client-react

Usage

import React from 'react'
import {
  Feather,
  AuthenticationForm,
  withCurrentUser
} from 'feather-client-react'

function App() {
  return (
    <Feather apiKey='pk_live_...'>
      <Home />
    </Feather>
  )
}

const Home = withCurrentUser((props) => {
  if (!props.currentUser) return <AuthenticationForm />
  else return <p>Current user: {props.currentUser.email}</p>
})

export default App

Package Sidebar

Install

npm i feather-client-react

Weekly Downloads

1

Version

0.0.27

License

MIT

Unpacked Size

267 kB

Total Files

6

Last publish

Collaborators

  • feather-id