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

Document anti-pattrens regarding props #1843

Open
Tracked in #2312
hamza1311 opened this issue May 8, 2021 · 2 comments
Open
Tracked in #2312

Document anti-pattrens regarding props #1843

hamza1311 opened this issue May 8, 2021 · 2 comments
Labels
documentation good first issue meta
Milestone

Comments

@hamza1311
Copy link
Member

@hamza1311 hamza1311 commented May 8, 2021

I think we should document anti-patterns. I would be fine with making a PR for those but first we need to list them.

  1. Taking String, instead of Cow<'static, str> as props.
  2. What else?

From #1834 (comment), as requested by @siku2

@siku2 siku2 added documentation meta labels May 8, 2021
@hamza1311 hamza1311 changed the title Tracking issue for documenting anti-pattrens regarding props Document anti-pattrens regarding props May 17, 2021
@martinitus
Copy link

@martinitus martinitus commented Sep 13, 2021

For a beginner (like me) who also doesn't have any significant frontend / react experience some more general "dos & and don'ts" would also be really helpful. Questions I am uncertain about include stuff like:

  • How much data should/could I pack into props: like 10000 structures that get rendered as a list/child elements?
  • How do I enable a component to fetch data (e.g. via an agent)? Should the handle to the agent be part of the props or of the struct?
  • When should I put stuff into the props, and which kind of objects should I maintain in the actual component struct?
    Hth

@hamza1311
Copy link
Member Author

@hamza1311 hamza1311 commented Jan 1, 2022

A section about anti-patterns/what not to do on the Properties page would be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue meta
Projects
None yet
Development

No branches or pull requests

3 participants