# How to create signup button in react

**URL:** <https://community.auth0.com/t/how-to-create-signup-button-in-react/55638>\
**Category:** Get Help\
**Tags:** react\
**Created:** [January 3, 2021, 6:58pm UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638 "2021-01-03T18:58:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahadwarsahil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mahadwarsahil/32/26639_2.png) [@mahadwarsahil](https://community.auth0.com/u/mahadwarsahil)\
**Post date:** [January 3, 2021, 6:58pm UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638/1 "2021-01-03T18:58:05Z")

</div>

Hey am fairly new to auth0 can someone tell me how to create a signup button that will take me directly to the signup page instead of on login am using the new universal login page

I searched through the new universal login page documentation and it says to add this parameter screen\_hint=signup but how to add it am using react

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [January 4, 2021, 1:15am UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638/2 "2021-01-04T01:15:21Z")

</div>

Hello @mahadwarsahil, Welcome to the Auth0 Community!

As you mentioned is correct for the new universal login you can use the screen\_hint=signup param

> **[New Universal Login Experience](https://auth0.com/docs/authenticate/login/auth0-universal-login/new-experience)**
>
> New Universal Login Experience

In your React App, you will need to add this param in the /authorize query which is generated for the initial login request. Have you tried entering this param in the rendering object?

Regards,  
Sid

---

<div class="post-metadata">

**Author:** ![mahadwarsahil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mahadwarsahil/32/26639_2.png) [@mahadwarsahil](https://community.auth0.com/u/mahadwarsahil)\
**Post date:** [January 4, 2021, 10:01am UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638/3 "2021-01-04T10:01:34Z")

</div>

hey thank you so much for the response

import React from “react”;

import { useAuth0 } from “@auth0/auth0-react”;

const LoginButton = (props) =\> {

const { loginWithRedirect } = useAuth0();

return (

```
<button

  onClick={() => loginWithRedirect()}

  className="button is-primary"

>

  Login

</button>

```

);

};

export default LoginButton;

this is my component. where to add screen\_hint=signup ☹

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [January 6, 2021, 5:49am UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638/4 "2021-01-06T05:49:38Z")

</div>

Hey @mahadwarsahil,

In the react application it will go in this code:

```
ReactDOM.render(
  <Auth0Provider
    domain={config.domain}
    clientId={config.clientId}
    audience={config.audience}
    redirectUri={window.location.origin}
    onRedirectCallback={onRedirectCallback}
    screen_hint="signup" // here

  >
    <App />
  </Auth0Provider>,
  document.getElementById("root")
);

```

This is in the index.js file.

Let me know if this helps!

---

<div class="post-metadata">

**Author:** ![mahadwarsahil](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mahadwarsahil/32/26639_2.png) [@mahadwarsahil](https://community.auth0.com/u/mahadwarsahil)\
**Post date:** [January 6, 2021, 9:53am UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638/5 "2021-01-06T09:53:33Z")

</div>

> [@sidharth.chaudhary](#):
>
> `screen_hint="signup"`

Thank you so much it worked like a charm!!! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 21, 2021, 9:53am UTC](https://community.auth0.com/t/how-to-create-signup-button-in-react/55638/6 "2021-01-21T09:53:35Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
