Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-react-readme-connect-imports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nylas/react": patch
---

Fix the import path in the README's Connect examples. `useNylasConnect` and `NylasConnectButton` are only exported from the `@nylas/react/connect` subpath, so the snippets that imported them from `@nylas/react` could not resolve.
10 changes: 5 additions & 5 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ or yarn

- **Connect**
- `useNylasConnect`, `NylasConnectButton`
- Import from `@nylas/react` or `@nylas/react/connect`
- Import from `@nylas/react/connect`

## Getting Started

Expand Down Expand Up @@ -121,7 +121,7 @@ The `useNylasConnect` hook provides a simple way to add OAuth authentication to
### Basic Usage

```jsx
import { useNylasConnect } from '@nylas/react';
import { useNylasConnect } from "@nylas/react/connect";

function LoginButton() {
const { isConnected, connect, logout, grant, isLoading } = useNylasConnect({
Expand Down Expand Up @@ -204,7 +204,7 @@ The `NylasConnectButton` component provides a simple way to add email provider a
### Basic Usage

```jsx
import { NylasConnectButton } from "@nylas/react";
import { NylasConnectButton } from "@nylas/react/connect";

function App() {
return (
Expand All @@ -227,7 +227,7 @@ function App() {
For applications that use external identity providers (via JWKS), you can pass identity provider tokens during authentication:

```jsx
import { NylasConnectButton } from "@nylas/react";
import { NylasConnectButton } from "@nylas/react/connect";

function App() {
// Function to retrieve JWT token from your external identity provider
Expand Down Expand Up @@ -258,7 +258,7 @@ function App() {
For enhanced security, you can handle the OAuth code exchange on your backend:

```jsx
import { NylasConnectButton } from "@nylas/react";
import { NylasConnectButton } from "@nylas/react/connect";

function App() {
const handleCodeExchange = async (params) => {
Expand Down
Loading