Skip to content

Repository files navigation

Nuxt 3 Boilerplate

Look at the Nuxt 3 documentation to learn more.

Setup

Prerequisites:

Make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

# pnpm
pnpm install --shamefully-hoist

Check out the deployment documentation for more information.

State management

For simple data is possible to use native nuxt state management (useState). Otherwise, for complex data, is better to use Pinia

useState Examples (in composables/states)

export const useGlobals = () => {
	const globals = useState("globals", () => {})

	const setGlobals = (data) => {
		globals.value = data
	}

	return {
		globals,
		setGlobals,
	}
}
export const useGlobals = () => useState("testGlobals")
const testGlobals = useGlobals()
testGlobals.value = { ... }

pinia example (in store/**)

export const useStore = defineStore("store", () => {
  return {}
})

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages