Skip to content

Instantly share code, notes, and snippets.

@mfal
Created February 18, 2025 14:35
Show Gist options
  • Select an option

  • Save mfal/904971f5a0361e696d80b19a3e426653 to your computer and use it in GitHub Desktop.

Select an option

Save mfal/904971f5a0361e696d80b19a3e426653 to your computer and use it in GitHub Desktop.
Using the SettingsProvider
import { SettingsProvider } from "@mittwald/flow-react-components";
export default function Layout(props) {
return (
<SettingsProvider type="localStorage" storageKey="my-app">
{props.children}
</SettingsProvider>
);
}
export default function MyList() {
return (
<List settingsStorageKey="my-list">
{ /* ... */ }
</List>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment