Skip to content

feature: type redux store#9

Merged
erikyo merged 2 commits into
erikyo:ui/drawerfrom
johnhooks:ui/drawer-suggestions
Apr 7, 2023
Merged

feature: type redux store#9
erikyo merged 2 commits into
erikyo:ui/drawerfrom
johnhooks:ui/drawer-suggestions

Conversation

@johnhooks
Copy link
Copy Markdown
Collaborator

Type the redux store.

@johnhooks johnhooks requested a review from erikyo April 7, 2023 22:50
export const hydrate = ( payload ) => {
return {
type: 'HYDRATE',
type: /** @type {'HYDRATE'} */ ( 'HYDRATE' ),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weird but required for it to be type 'HYDRATE' not string. Otherwise the type union in action types doesn't work right in the reducer.

Comment thread src/scripts/store/index.js Outdated
*/

/**
>>>>>>> Stashed changes
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGH... JUST A SEC THESE SHOULDN'T BE HERE

Comment thread src/scripts/wp-notify.js
/**
* List all notifications or those of a particular context
*
* @param {string|false} context
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The false value was never handled in the selector.

Comment thread src/scripts/wp-notify.js
/**
* Clear all notifications
*
* @param {string|false} context
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The false value was never handled in the selector

@erikyo erikyo merged commit 8c20c4d into erikyo:ui/drawer Apr 7, 2023
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.

2 participants