Proposal for changes to API
See original GitHub issueThis is a proposal for changes to the user facing API of Radi. It’s just a proposal, take it with a grain of salt.
- Add support for extending Radi’s Component class rather than only being able to use
component, eg:
class Counter extends Radi.Component {
view() {
return <h1>Foo</h1>
}
}
- Reuse the npm prop-types package to provide a type checking system for props.
- Add a map callback to Listener, which would be a shortcut for mapping arrays, but it would also enable for more efficient list rendering in the future.
- Separate actions, mixins, props and state. So not
this.foobutthis.state.foo. - Provide shortcuts to the
lfunction. Pass astateandpropsfunction toviewso that you can dostate('foo')rather thanl(component, 'state', 'foo'). Only makes sense if the point above is applied.
Let me know what you think! 😄
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:113 (57 by maintainers)
Top Results From Across the Web
API Improvement Proposals: Google's Take on the API Style ...
API Improvement Proposals, or AIPs, are documents outlining Google's guidelines for API design. Most AIPs focus on universal design standards — ...
Read more >API Change Proposals - Standard library developers Guide
The API Change Proposal process is intended to be a lightweight first step to getting new APIs added to the standard library. The...
Read more >Identify, Edit, and Streamline API Collaboration with Proposals!
Proposals give you a quick overview of current changes to your APIs. You can now automatically surface in-flight API Design and Documentation ...
Read more >API documentation proposal · WebPlatform Docs
Template and forms changes that need to be implemented; Priorities and project management; Additional documents. Current state of the WPD API documentation.
Read more >Using Proposed API - Visual Studio Code
We give our best effort to avoid breaking API changes, and extension authors could ... <proposal>.d.ts to your project that uses @types/vscode ,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My shallow proposal is purely syntactic sugar. Use decorators.
The Action decorator is just for labeling.
So as a Summary
Issue Summary
Component Declaration
Extending
Radi.ComponentUsing
@ComponentdecoratorState in the view
Having
this.state.propbe listenersInjecting a
statefunction to the viewInjecting a
statefunction to the view and use selectorsUsing a
listenfunction withing the componentRemaining concerns
Am I missing something?