Skip to content
This repository was archived by the owner on Jul 19, 2020. It is now read-only.
This repository was archived by the owner on Jul 19, 2020. It is now read-only.

'Events' vs 'Callbacks' in the documentation #76

Open

Description

@rlasjunies

'Callback' word could be confusing and is used for different concepts in Yew,
Events seems to be easier to understand in the domain of HTML component interaction

The documentation may be improved with a structure inspired by the one of StencilJS.com ( there is some similarity between the projects)

Could be something like:

...

Components

  • Component: overview and basic example

  • Life cycle: more details on all the steps

  • properties: overview

    1. optional property with default value (basic example)
    2. optional property with a specific value (basic example)
    3. mandatory property (basic example)
    4. good to know
      • derive macro
      • PartialEq
      • Memory Speed

Events:

  • emit event and trap it is parent
  • events with value

Nested components

i feel this subject should be extracted from html! section

  • Nested component
  • Nested components with properties

Styling

i feel this subject should be extracted from more section even if there is not a lot to say for now.

  • static CSS file
  • dev feedbacks; use of CSSinRust
  • official support in Yew under analysis ... #533

Activity

  1. teymour-aldridge commented on May 2, 2020

    @teymour-aldridge
    Contributor

    I'm not sure that the derive macro should be just a "good to know" because you shouldn't try to implement Properties manually for a type.

  2. rlasjunies commented on May 3, 2020

    @rlasjunies
    Author

    I put it their because it in in the current documentation.
    I take the remark, of course you will revise the documentation update.
    I currently drafting the proposal. Writing I am already adjusting the proposal made initially
    I hope I will have something to propose in the afternoon.

  3. rlasjunies commented on May 3, 2020

    @rlasjunies
    Author

    Finally I've something I feel confortable for newbies like me.
    The current proposal looks like this:

    1. Components
      8.1. Internal State
      8.2. Trap events
      8.3. Properties
      8.4. Emit events
      8.5. Nested component
      8.6. Refs
      8.7. Styling
      8.8. Life cycle

    I did my best to be sure, I do not loose previous information. Please let me know what you think.

  4. rlasjunies commented on May 3, 2020

    @rlasjunies
    Author

    @jstarry @teymour-aldridge
    I've created a dummy projects to tests the example before to put in the documentation.
    you could find here https://github.com/rlasjunies/yew-doc-examples

    If you are interested we can put it in the Yew/stack

  5. rlasjunies commented on May 3, 2020

    @rlasjunies
    Author

    @teymour-aldridge

    I'm not sure that the derive macro should be just a "good to know" because you shouldn't try to implement Properties manually for a type.

    Please check if the documentation is correct in regard of your comment. Mainly in the chapter 'Properties'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions