Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
import { createContext, useContext } from 'react';
import { LocalDatabaseViewNode } from '@colanode/client/types';
interface DatabaseViewsContext {
views: LocalDatabaseViewNode[];
activeViewId: string;
onActiveViewChange: (viewId: string) => void;
inline: boolean;
}
export const DatabaseViewsContext = createContext<DatabaseViewsContext>(
{} as DatabaseViewsContext
);
export const useDatabaseViews = () => useContext(DatabaseViewsContext);