Skip to content

Commit

Permalink
Rename Dispatch::cx -> Dispatch::context
Browse files Browse the repository at this point in the history
  • Loading branch information
intendednull committed Dec 12, 2023
1 parent 4bbd913 commit 19773d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/yewdux-input/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub trait InputDispatch<S: Store> {

impl<S: Store> InputDispatch<S> for Dispatch<S> {
fn context(&self) -> &Context {
self.cx()
self.context()
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/yewdux/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<S: Store> Default for Dispatch<S> {
impl<S: Store> Dispatch<S> {
/// Create a new dispatch with the global context (thread local).
///
/// This is only available for wasm32 targets. For SSR, see the YewduxRoot pattern.
/// This is only available for wasm. For SSR, see the YewduxRoot pattern.
#[cfg(target_arch = "wasm32")]
pub fn global() -> Self {
Self::new(&Context::global())
Expand All @@ -68,7 +68,7 @@ impl<S: Store> Dispatch<S> {
}

/// Get the context used by this dispatch.
pub fn cx(&self) -> &Context {
pub fn context(&self) -> &Context {
&self.cx
}

Expand Down

0 comments on commit 19773d2

Please sign in to comment.