
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@daily-co/daily-react
Advanced tools
Daily React makes it easier to integrate [@daily-co/daily-js](https://www.npmjs.com/package/@daily-co/daily-js) in React applications.
Daily React makes it easier to integrate @daily-co/daily-js in React applications.
To get started with Daily React, include DailyProvider
in your app:
import { DailyProvider } from '@daily-co/daily-react';
function App({ roomUrl }) {
return <DailyProvider url={roomUrl}>{/* … */}</DailyProvider>;
}
Then in your application you can access Daily React:
import {
useParticipantIds,
useParticipantProperty,
} from '@daily-co/daily-react';
function ParticipantRow({ id }) {
const [username, videoState, audioState] = useParticipantProperty(id, [
'user_name',
'tracks.video.state',
'tracks.audio.state',
]);
return (
<li style={{ display: 'flex', gap: 8 }}>
<span>{username ?? 'Guest'}</span>
<span>📷{videoState === 'playable' ? '✅' : '❌'}</span>
<span>🎙️{audioState === 'playable' ? '✅' : '❌'}</span>
</li>
);
}
function Participants() {
const participantIds = useParticipantIds({
filter: 'remote',
sort: 'user_name',
});
return (
<ul>
{participantIds.map((id) => (
<ParticipantRow key={id} id={id} />
))}
</ul>
);
}
Learn more about Daily React by reading our docs at https://docs.daily.co/reference/daily-react.
The daily-react
package is published to npm. To install the latest stable version, run one of the following commands:
npm install @daily-co/daily-react @daily-co/daily-js jotai
# or with yarn
yarn add @daily-co/daily-react @daily-co/daily-js jotai
Notice that @daily-co/daily-react
requires @daily-co/daily-js and jotai as peer dependencies.
@daily-co/daily-react
manages its internal state using jotai
. You can read more about jotai
in their Introduction.
We've set up automatic tests using jest and Testing Library. You can run the tests using the following command:
npm test
# or with yarn
yarn test
Please head over to our contributing guide to learn more about how you can contribute to daily-react
.
In case you've got general questions about Daily or need technical assistance, please reach out via help@daily.co.
FAQs
Daily React makes it easier to integrate [@daily-co/daily-js](https://www.npmjs.com/package/@daily-co/daily-js) in React applications.
The npm package @daily-co/daily-react receives a total of 28,613 weekly downloads. As such, @daily-co/daily-react popularity was classified as popular.
We found that @daily-co/daily-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.