Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested components are initialised in the wrong order #97

Open
Tamschi opened this issue Feb 20, 2022 · 0 comments
Open

Nested components are initialised in the wrong order #97

Tamschi opened this issue Feb 20, 2022 · 0 comments
Labels
accepted This will be worked on breaking Introduces or requests a breaking change. domain: Rust Involves Rust code. effort: 2 Relative effort required. There's no specific unit of measurement. good first issue Good for newcomers type: bug Something isn't working as expected work: clear A known solution is (to be) implemented.

Comments

@Tamschi
Copy link
Owner

Tamschi commented Feb 20, 2022

Given a component

asteracea::component! {
    Test()(/*…*/)

    <*A *ca={a}
        <*B *cb={b}
    >
}

, Asteracea will currently evaluate this in the order b - B - a - A, which may be unexpected.

It should be a - A - b - B, consistent with render-time evaluation. This can likely be achieved by (re-)parsing the container's binding earlier in component.rs (where child components are implemented), before parsing its content.

Sibling expressions should always run from top to bottom.

A test for both is necessary. Asserting and incrementing a counter in the relevant places should work there.

@Tamschi Tamschi added type: bug Something isn't working as expected good first issue Good for newcomers accepted This will be worked on domain: Rust Involves Rust code. work: clear A known solution is (to be) implemented. breaking Introduces or requests a breaking change. effort: 2 Relative effort required. There's no specific unit of measurement. labels Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This will be worked on breaking Introduces or requests a breaking change. domain: Rust Involves Rust code. effort: 2 Relative effort required. There's no specific unit of measurement. good first issue Good for newcomers type: bug Something isn't working as expected work: clear A known solution is (to be) implemented.
Projects
None yet
Development

No branches or pull requests

1 participant