DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.11k stars 771 forks source link

New apps wo router using main, errors twice on load, every time #2533

Closed rogusdev closed 1 month ago

rogusdev commented 2 months ago

Problem

Apparently some new warnings are triggered by the built in behavior of dioxus. That seems undesirable πŸ˜‰

ERROR GITDIR/dioxus/packages/core/src/properties.rs:144 It looks like you called the component App like a function instead of a component. Components should be called with braces like `App { prop: value }` instead of as a function
demo.js:449:21

To be clear, @ealmloff , it looks like this is from https://github.com/DioxusLabs/dioxus/pull/2461/files#diff-e6199434c34c915eed237c16bcdf8167d70272bafd878fb3c95054939c585e11R122

Steps To Reproduce

Repro with dx new, false router, use dioxus local with main HEAD instead of crate (dioxus = { path = "../dioxus/packages/dioxus", features = ["web"] }), then dx serve

Expected behavior

Don't throw errors for a starter app automatically!

Screenshots

If applicable, add screenshots to help explain your problem.

Environment:

Questionnaire

rogusdev commented 2 months ago

https://discord.com/channels/899851952891002890/1252735056242278450/1252736410885161050 might add more context