Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@medplum/react-hooks
Advanced tools
The Medplum React Hooks Library provides non-UI React features for your application.
Most users will want the full Medplum React Component Library, @medplum/react
. However, that library has peer dependencies on Mantine, which may not be desired.
useMedplum
- handles shared global instance of MedplumClient
useResource
- reads a resource by ID or reference with intelligent cachinguseSearch
- performs a FHIR search with intelligent state managementAdd as a dependency:
npm install @medplum/react-hooks
Note the following peer dependencies:
import { MedplumClient } from '@medplum/core';
import { MedplumProvider } from '@medplum/react';
const medplum = new MedplumClient();
export function App() {
return (
<MedplumProvider medplum={medplum}>
<MyPage1 />
<MyPage2 />
<Etc />
</MedplumProvider>
);
}
For more details on how to setup MedplumClient
, refer to the docs for medplum
.
useMedplum
import { useMedplum } from '@medplum/react-hooks';
export function MyComponent() {
const medplum = useMedplum();
return <div>{JSON.stringify(medplum.getProfile())}</div>;
}
Medplum is a healthcare platform that helps you quickly develop high-quality compliant applications. Medplum includes a FHIR server, React component library, and developer app.
Apache 2.0. Copyright © Medplum 2023
FAQs
Medplum React Hooks Library
The npm package @medplum/react-hooks receives a total of 764 weekly downloads. As such, @medplum/react-hooks popularity was classified as not popular.
We found that @medplum/react-hooks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.