> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Daily Provider

> The DailyProvider gives every component in your application access to the Daily call object.

`<DailyProvider callObject={callObject}>`

Stores call state and manages a [call object](https://docs.daily.co/docs/daily-js/concepts/call-modes.md#call-object-mode) instance, giving every component in your tree access to it. Two modes are supported: pass an existing call object, or provide props for `DailyProvider` to create one.

We recommend utilizing [`useCallObject`](https://docs.daily.co/reference/daily-react/use-call-object) to create your own call object instance.

## Props

### Existing call object mode

**callObject** `Object` *required*

Pre-initialized call object instance (instantiated via [`createCallObject()`](https://docs.daily.co/reference/daily-js/factory-methods/create-call-object)).

### Call object creation mode

**url** `string` *required*

The URL of the Daily room to join.

**audioSource** `string | MediaStreamTrack | boolean`

Audio source for the call. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

**videoSource** `string | MediaStreamTrack | boolean`

Video source for the call. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

**dailyConfig** `Object`

Daily configuration options. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

**receiveSettings** `Object`

Receive settings for the call. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

**subscribeToTracksAutomatically** `boolean`

Whether to automatically subscribe to tracks. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

**token** `string`

Meeting token. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

**userName** `string`

Display name for the local participant. See [DailyCall properties](https://docs.daily.co/reference/daily-js/types/daily-call-options.md) for details.

> [!NOTE]
>
> Changing any of the props in call object creation mode will destroy the current instance and create a new one with the updated props.

### Optional props

**jotaiStore** `Object`

`store` to be passed to Daily React's internal Jotai `<Provider>`. If you use Jotai in your app, this will store Daily React's internal state atoms in your Jotai store.

## Example

```jsx theme={null}
import { DailyProvider, useCallObject } from '@daily-co/daily-react';

function App() {
  // Create an instance of the Daily call object
  const callObject = useCallObject();

  return <DailyProvider callObject={callObject}>{children}</DailyProvider>;
}
```

### Store Daily React's state in your own Jotai Provider

```jsx theme={null}
import { DailyProvider, useCallObject } from '@daily-co/daily-react';
import { createStore, Provider } from 'jotai';

const jotaiStore = createStore();

function App() {
  // Create an instance of the Daily call object
  const callObject = useCallObject();

  return (
    <Provider store={jotaiStore}>
      <DailyProvider callObject={callObject} jotaiStore={jotaiStore}>
        {children}
      </DailyProvider>
    </Provider>
  );
}
```

## See also

> [card] Hooks
>
> * [useCallObject()](https://docs.daily.co/reference/daily-react/use-call-object.md)
> * [useCallFrame()](https://docs.daily.co/reference/daily-react/use-call-frame.md)
> * [useDaily()](https://docs.daily.co/reference/daily-react/use-daily.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.