default
default():
object
Defined in: src/hooks/useAppState.ts:53
A hook intended for generating and passing all necessary application state, data and functions, such as what section is currently opened, is the navbar expanded, all sections’ IDs, functions to add or delete sections and more.
Returns
Section titled “Returns”| Name | Type | Description | Defined in |
|---|---|---|---|
activeSectionIds |
SectionId[] |
- | src/hooks/useAppState.ts:328 |
addAllSections() |
() => void |
- | src/hooks/useAppState.ts:329 |
addSections() |
(sectionIds) => void |
Activates sections. In other words, adds them to the navbar and makes it possible to enter the corresponding resume data. | src/hooks/useAppState.ts:330 |
deleteAll() |
() => void |
Deletes all sections except undeletable ones. Opens the Personal section unless it’s already opened. | src/hooks/useAppState.ts:331 |
deleteSections() |
(sectionIds) => void |
Deletes sections from the navbar. If an undeletable section’s ID is passed, nothing is done with it. If the opened section is deleted, two outcomes are possible: - The deleted section is the last active section, and then the section before it is opened automatically. - Otherwise, the next section is opened. | src/hooks/useAppState.ts:332 |
editorMode |
boolean |
- | src/hooks/useAppState.ts:333 |
openedSectionId |
SectionId |
- | src/hooks/useAppState.ts:335 |
openSection() |
(sectionId) => void |
Opens the specified section. | src/hooks/useAppState.ts:334 |
reorderSections() |
(newActiveSectionIds) => void |
Reorders active sections (which is visible in the navbar). | src/hooks/useAppState.ts:336 |
resetScreenReaderAnnouncement() |
() => void |
Resets the screen reader annoncement, making it an empty string. | src/hooks/useAppState.ts:337 |
screenReaderAnnouncement |
string |
- | src/hooks/useAppState.ts:338 |
toggleEditorMode() |
() => void |
- | src/hooks/useAppState.ts:339 |
updateScreenReaderAnnouncement() |
(announcement) => void |
Updates the screen reader announcement. | src/hooks/useAppState.ts:340 |