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

Read-only props #77

Open
ThijsTyZ opened this issue Mar 24, 2022 · 1 comment
Open

Read-only props #77

ThijsTyZ opened this issue Mar 24, 2022 · 1 comment
Assignees
Labels
Enhancement New feature or request Needs Refinement The request is clear, but the approach is not.

Comments

@ThijsTyZ
Copy link
Collaborator

It would be nice if Muban supports props which are only readable from outside, but not writable.

@ThijsTyZ ThijsTyZ added the Enhancement New feature or request label Mar 24, 2022
@ThaNarie ThaNarie added the Needs Refinement The request is clear, but the approach is not. label Sep 26, 2022
@ThaNarie
Copy link
Contributor

Maybe we can add a .readOnly() to the propTypes specification.

It would need to make that information available in the type, so it can be used to type the setProps(props) parameter – that is used for the bindings – and of course to be available during runtime to throw an error if a readonly (or any unknown prop) is passed.

@jspolancor any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Needs Refinement The request is clear, but the approach is not.
Projects
None yet
Development

No branches or pull requests

3 participants