INNER CODE UNIT · TypeScript

NavigationService

kanzitelli/rnn-starter · src/services/navigation/index.ts:12

export class NavigationService implements IService {
  private inited = false;
  private mountedComponents: Record<string, string> = {}; // Record<ComponentId, ComponentName>

  init = async (): PVoid => {
    if (!this.inited) {
      this.registerComponentDidAppearListener();
      this.configureDefaultOptions();

      this.inited = true;
    }
  };

  handleUIOptionsChange = () => {
    // setting common default options
    this.configureDefaultOptions();

    // updating options among mounted components

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…