fyr.jsPreparing the runtime

Documentation

Controllers

Controllers group state, methods, computed values, watchers, and lifecycle work for a Fyr application.

Controller definition

Methods run with the controller context, so application state is available as this.state.

Fyr.createApp("profile", {
  state: { saved: false },
  methods: {
    save() { this.state.saved = true; }
  },
  mounted() { console.log("Ready"); }
});
Keep exploringSee framework examples