melony.dev

defineView

Melony uses the defineView function to create different types of views. This function takes three arguments:

  1. type: A string specifying the view type ("list", "form", or "detail").
  2. config: An object containing the configuration for the view.
  3. action: A server action function that handles data operations for the view.
export const projectsListView = defineView(
  "list",
  { ...config },
  getProjectsListAction
);

On this page

No Headings