Hands-on Rust: Confused about WantsToMove not being used as previous components (page 137)

In page 136, a new component is created, “WantsToMove”.

In page 137, this new component is used in the function “movement”, but I find it very confusing that while before components were written before the function declaration, such as in:

#[read_component(Player)]

WantsToMove is not used like that, but as a function parameter.

From Chapter 6 and the introduction of Legion and ECS, I am finding very difficult to follow the book. I think the learning curve suddenly sky-rockets. Perhaps this is why I am confused about WantsToMove.