Skip to content

Consolidate app initialization logic#2053

Merged
outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime:init-outside-workspace
Jan 2, 2020
Merged

Consolidate app initialization logic#2053
outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime:init-outside-workspace

Conversation

@outoftime
Copy link
Contributor

@outoftime outoftime commented Jan 2, 2020

App initialization logic has historically occurred in two places:

  • In top-level code in the application module
  • In the mount hook for the <Workspace> component

The former is hard to test and not necessarily intuitive; the second is out-of-place since none of the initialization logic is in fact related to the component in question.

So, consolidate all initialization logic into a new index module for the init package; a single init() function is now the single entrypoint into initialization. As well as better organization this also made it more practical to write tests for application initialization.

@outoftime outoftime force-pushed the init-outside-workspace branch 2 times, most recently from fcc4ff5 to ce2617e Compare January 2, 2020 03:37
@outoftime outoftime force-pushed the init-outside-workspace branch from ce2617e to 01cd6ae Compare January 2, 2020 04:01
@outoftime outoftime merged commit 93286c2 into popcodeorg:master Jan 2, 2020
@outoftime outoftime deleted the init-outside-workspace branch January 2, 2020 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant