2.0.9 • Published 4 months ago

fhirpath-jotai v2.0.9

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

FHIRPath 🔥 Jotai

Make FHIRPath calculations reactive using Jotai.

Ever wanted to make your FHIRPath expressions reactive? Now you can! This library provides a way to use FHIRPath expressions in a reactive way using Jotai.

!IMPORTANT This is repository is still in a early stage and not production ready yet. 📢 Stay tuned for more info. 👋 Reach out if you'd like to help.

Usage

import { atom } from 'jotai';
import { expressionAtom } from 'fhirpath-jotai';

const heightAtom = atom(180);
const weightAtom = atom(80);

const bmiExpressionAtom = expressionAtom('%weight / (%height/100).power(2)', {
  weight: weightAtom,
  height: heightAtom,
});

Granular updates 🎯

The expressionAtom will only update when the values it depends on change. This means that if you have multiple expressions that depend on the same atoms, only the expressions that are affected by the change will update. image

2.0.9

4 months ago

2.0.3

4 months ago

2.0.2

4 months ago

2.0.5

4 months ago

2.0.4

4 months ago

2.0.7

4 months ago

2.0.6

4 months ago

2.0.8

4 months ago

2.0.1

4 months ago

0.0.0

6 months ago