13.0.1 • Published 11 months ago

@agribank/ignite v13.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Ignite

This package is responsible for initializing the whole app. Which includes:

  1. reading config files (using fetch requests to config files)
  2. reading config params (from search params)
  3. initializing language and global setting stores
  4. getting auth tokens
  5. getting theme and palette

all of these happen by calling the useInit hook which returns the ready boolean status.

Examples:

import { searchParamsConfigSchema, useInit, useIgniteStore } from "@agribank/ignite";
function App() {
	const isReady = useInit({
		onInitializationFailed: (message) => {
			pushAlert({
				hasConfirmAction: true,
				messageText: message,
				type: "error"
			});
			return false;
		}
	});
	const theme = useIgniteStore((state) => state.settings.theme);

	return (
        {isReady ? <YouApp theme={theme} /> : "loading"}
	);
}
  • calling useIgniteStore without the useInit is useless (just once in the tree), because it never fills the values.
13.0.1

11 months ago

13.0.0

11 months ago

12.0.0

11 months ago

11.0.1

11 months ago

11.0.0

11 months ago

10.0.0

11 months ago

9.0.2

11 months ago

9.0.1

12 months ago

9.0.0

12 months ago

8.0.0

12 months ago

7.0.0

12 months ago

6.0.3

12 months ago

6.0.2

12 months ago

6.0.0

12 months ago

5.2.0

12 months ago

5.1.0

12 months ago

5.0.0

12 months ago

4.0.2

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.0

1 year ago

2.0.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago