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

feature request: customized function arguments for rt-stateless #215

Open
yatra9 opened this issue Mar 7, 2017 · 0 comments
Open

feature request: customized function arguments for rt-stateless #215

yatra9 opened this issue Mar 7, 2017 · 0 comments

Comments

@yatra9
Copy link

yatra9 commented Mar 7, 2017

another request.

It would be nice to allow customization of the argument variables of rt-stateless function (instead of predetermined props and context).

Especially, I want use destructuring assignment feature of ES6 on the props argument.

For example,

<div rt-stateless rt-stateless-props="{person}">Hello {person}</div>

or

<div rt-stateless rt-stateless-props="{{person}}">Hello {person}</div>

Compiled:

define([
    'react',
    'lodash'
], function (React, _) {
    'use strict';
    return function ({person}, context) {
        return React.createElement('div', {}, 'Hello ', person);
    };
});
@yatra9 yatra9 changed the title feature request: custamize rt-statelessthe feature request: customized function arguments for rt-stateless Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant