This guide was generated by xuda-cli.
You can remove all generated folder guides later with:
npm run clean:readmes
Use this folder for shared app state and cross-feature values.
What belongs here
- signed-in user information
- campus or tenant context
- app-wide feature flags
- shared filters, preferences, and UI mode values
File rules
- file type:
.xu - each file compiles to a Xuda
globalsunit - there is usually one main globals file, but you can split by concern if needed
Recommended blocks
<meta lang="json5"><fields lang="json5">- optional
<events lang="json5"> - optional
<datasource lang="json5">
Important rules
- globals do not render UI, so there is no
<template> - keep globals focused on shared values, not page-specific presentation
- if a value only matters to one screen, keep it in that component instead
Example
<meta lang="json5">
{
id: "school_globals",
menuTitle: "School Globals"
}
</meta>
<fields lang="json5">
{
campus_name_v: { type: "string", value: "Boston Campus" },
current_user_name_v: { type: "string", value: "Avery Walker" },
dark_mode_v: { type: "boolean", value: false }
}
</fields>