Adjusting the Register component

Next, we are going to adjust the Register component with the following steps:

  1. Edit src/user/Register.js and adjust the import statement to also import the useAPIRegister Hook:
import { useDispatch, useAPIRegister } from '../hooks'
  1. Then, replace the current Resource Hook with the following:
    const [ user, register ] = useAPIRegister()

Now the Register component uses our custom API Hook to register users via the API.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.36.30