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

statelessComponent with displayName #156

Open
anilanar opened this issue Sep 12, 2018 · 1 comment
Open

statelessComponent with displayName #156

anilanar opened this issue Sep 12, 2018 · 1 comment

Comments

@anilanar
Copy link

As the title says. The implementation is simple:

exports.statelessComponent = function(displayName) { 
    return function(x) { 
        val y = function(props) { return x(props); };
        y.displayName = displayName;
        return y;
    };
};

Can name it statelessComponent' or something similar to avoid a breaking change.

@natefaubion
Copy link
Contributor

You can already do this additional boxing with component. statelessComponent just coerces an existing function. It's just that PureScript has no semantics for adding a name to a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants