Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/main-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check spelling
run: |
sudo apt-get install aspell
ci/spellcheck.sh list
uses: crate-ci/typos@v1.39.2

doc_tests:
name: Documentation Tests
Expand Down
86 changes: 0 additions & 86 deletions ci/dictionary.txt

This file was deleted.

101 changes: 0 additions & 101 deletions ci/spellcheck.sh

This file was deleted.

2 changes: 1 addition & 1 deletion examples/async_clock/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Component for AsyncComponent {

// In parallel we launch a background task that produces jokes to make the clock
// more fun to watch. The jokes are emitted back to the component
// throught the Msg::Joke callback.
// through the Msg::Joke callback.
let joke_cb = ctx.link().callback(Msg::Joke);
emit_jokes(joke_cb);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/communication_child_to_parent/src/parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ impl Component for Parent {

fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
match msg {
Msg::ButtonClick(childs_name) => {
Msg::ButtonClick(children_name) => {
// Keep track of the name of the child that was clicked
self.last_updated = Some(childs_name);
self.last_updated = Some(children_name);

// Increment the total number of clicks
self.total_clicks += 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ impl Component for GrandParent {

fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
match msg {
Msg::ButtonClick(childs_name) => {
Msg::ButtonClick(children_name) => {
// Update the shared state
let shared_state = Rc::make_mut(&mut self.state);
shared_state.total_clicks += 1;
shared_state.last_clicked = Some(childs_name);
shared_state.last_clicked = Some(children_name);
true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Yew • Granparent-to-GrandChild Communication</title>
<title>Yew • Grandparent-to-Grandchild Communication</title>
<link data-trunk rel="rust" />
<link data-trunk rel="sass" href="index.scss" />
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/keyed_list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This example consists of a list which can be manipulated in various ways.

### Notes

If you would like to view this example as a performance demonstation, run this example in `release` mode.
If you would like to view this example as a performance demonstration, run this example in `release` mode.

## Concepts

Expand Down
4 changes: 2 additions & 2 deletions packages/yew-macro/src/derive_props/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct DerivePropsInput {
preserved_attrs: Vec<Attribute>,
}

/// AST visitor that replaces all occurences of the keyword `Self` with `new_self`
/// AST visitor that replaces all occurrences of the keyword `Self` with `new_self`
struct Normaliser<'ast> {
new_self: &'ast Ident,
generics: &'ast Generics,
Expand Down Expand Up @@ -152,7 +152,7 @@ impl Parse for DerivePropsInput {
}

impl DerivePropsInput {
/// Replaces all occurences of `Self` in the struct with the actual name of the struct.
/// Replaces all occurrences of `Self` in the struct with the actual name of the struct.
/// Must be called before tokenising the struct.
pub fn normalise(&mut self) {
let mut normaliser = Normaliser::new(&self.props_name, &self.generics);
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/function_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl FunctionComponent {
let mut block = *block.clone();
let (impl_generics, _ty_generics, where_clause) = generics.split_for_impl();

// We use _ctx here so if the component does not use any hooks, the usused_vars lint will
// We use _ctx here so if the component does not use any hooks, the unused_vars lint will
// not be triggered.
let ctx_ident = Ident::new("_ctx", Span::mixed_site());

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/html_lints/fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn main() {
let bad_img = html! {
<img src="img.jpeg"/>
};
let misformed_tagname = html! {
let malformed_tagname = html! {
<tExTAreA />
};
compile_error!("This macro call exists to deliberately fail the compilation of the test so we can verify output of lints");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use syn::parse_macro_input;

/// Derive macro used to mark an enum as Routable.
///
/// This macro can only be used on enums. Every varient of the macro needs to be marked
/// This macro can only be used on enums. Every variant of the macro needs to be marked
/// with the `at` attribute to specify the URL of the route. It generates an implementation of
/// `yew_router::Routable` trait and `const`s for the routes passed which are used with `Route`
/// component.
Expand Down
4 changes: 2 additions & 2 deletions packages/yew/src/dom_bundle/bsuspense.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This module contains the bundle version of a supsense [BSuspense]
//! This module contains the bundle version of a suspense [BSuspense]

use gloo::utils::document;
use web_sys::Element;
Expand All @@ -22,7 +22,7 @@ enum Fallback {
#[derive(Debug)]
pub(super) struct BSuspense {
children_bundle: BNode,
/// The supsense is suspended if fallback contains [Some] bundle
/// The suspense is suspended if fallback contains [Some] bundle
fallback: Option<Fallback>,
detached_parent: Element,
key: Option<Key>,
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/dom_bundle/btag/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ mod tests {

let test_ref = NodeRef::default();

// We want to test appy_diff with Attributes::IndexMap, so we
// We want to test apply_diff with Attributes::IndexMap, so we
// need to create the VTag manually

// Create <div disabled="disabled" tabindex="0">
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/dom_bundle/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl DomSlot {
gloo::console::error!(msg, err, parent, next_sibling, node);
// Log via tracing for consistency
tracing::error!(msg);
// Panic to short-curcuit and fail
// Panic to short-circuit and fail
panic!("{}", msg)
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/dom_bundle/subtree_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ impl SubtreeData {
event: &'s Event,
) -> Option<impl 's + Iterator<Item = (&'s SubtreeData, Element)>> {
// Note: the event is not necessarily identically the same object for all installed
// handlers hence this cache can be unreliable. Hence the cached repsonsible_tree_id
// handlers hence this cache can be unreliable. Hence the cached responsible_tree_id
// might be missing. On the other hand, due to event retargeting at shadow roots,
// the cache might be wrong! Keep in mind that we handle events in the capture
// phase, so top-down. When descending and retargeting into closed shadow-dom, the
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/functional/hooks/use_effect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ where
/// fn HelloWorld() -> Html {
/// use_effect_with((), move |_| {
/// || {
/// log!("Noo dont kill me, ahhh!");
/// log!("Nooo dont kill me, ahhh!");
/// }
/// });
///
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/html/component/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub(crate) struct ComponentState {
#[cfg(feature = "csr")]
has_rendered: bool,
/// This deals with an edge case. Usually, we want to update props as fast as possible.
/// But, when a component hydrates and suspends, we want to continue using the intially given
/// But, when a component hydrates and suspends, we want to continue using the initially given
/// props. This is prop updates are ignored during SSR, too.
#[cfg(feature = "hydration")]
pending_props: Option<Rc<dyn Any>>,
Expand Down
4 changes: 2 additions & 2 deletions packages/yew/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ where
it.into_iter().map(|n| n.into())
}

fn array_single<T: ImplicitClone + 'static>(singl: T) -> IArray<T> {
IArray::Rc(Rc::new([singl]))
fn array_single<T: ImplicitClone + 'static>(single: T) -> IArray<T> {
IArray::Rc(Rc::new([single]))
}

/// A special type necessary for flattening components returned from nested html macros.
Expand Down
5 changes: 5 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[files]
extend-exclude = ["examples/router/data/syllables.txt", "examples/function_router/data/syllables.txt"]

[default.extend-words]
ba = "ba"
2 changes: 1 addition & 1 deletion website/blog/2022-11-24-release-0-20.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Learn more at [Server-side rendering](/docs/advanced-topics/server-side-renderin

### Data fetching

With SSR comes new ways of data-fetching. The newly added [`use_prepared_state!`](https://api.yew.rs/next/yew/functional/macro.use_prepared_state.html) hook can be used to fetch data while rendering on the server and seemlessly use it in the component.
With SSR comes new ways of data-fetching. The newly added [`use_prepared_state!`](https://api.yew.rs/next/yew/functional/macro.use_prepared_state.html) hook can be used to fetch data while rendering on the server and seamlessly use it in the component.

For client-side fetching, Yew now supports render-as-you-fetch approach with [Suspense](/docs/concepts/suspense).

Expand Down
2 changes: 1 addition & 1 deletion website/docs/concepts/html/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ html! { <my-element ~property="abc" /> };

:::tip

The braces around the value can be ommited if the value is a literal.
The braces around the value can be omitted if the value is a literal.

:::

Expand Down
Loading
Loading