-
Notifications
You must be signed in to change notification settings - Fork 59
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
Improving Metal.js Lifecycle and Compatiblilty #255
Comments
Hey @mthadley, I've tried to gather some information here to see what we have and what we might need. Could you double check and expand on this?
|
I believe |
Are you proposing a |
For most use cases, I think by having both |
Hey guys, I think the biggest question I have regarding this. Is whether we need to switch 1) One to one match with React and backwards compatibilty:In this scenario we adopt the method names from React, and also keep around the
2) Custom names (sticking with our current naming pattern):In this scenario, we just stick with our current lifecycle methods, and name the
Recently our stance on Metal is that it's primarily intended to fit our needs Thoughts? @jbalsas @mthadley @bryceosterhaus |
I agree, option 2 makes most sense to me. I think its best for us to just keep our own naming convention and not follow React, otherwise we will have a tendency to try and mirror them as much as possible. It makes sense for Preact, but not for us. |
I'm on board with option 2. I think the biggest problem was not having equivalent lifecycles for specific purposes (like |
I'm fine going either way. The strongest argument I see that could back up option 1 is that it would decrease a couple of degrees on the learning curve steepness. But, like @mthadley said, that could be improved by having plentiful and easy to find documentation. |
I've sent #270. I'm still open to renaming the new lifecycle methods if anyone has better ideas. The strangest part about it, is that Soy components have The problem is that for JSX components the method won't fire for internal state changes (only props), so we can't just call it |
Also related: #271 Adds |
Changes have been merged to |
Now that Metal.js is more mature, we can start thinking about both improving it's lifecycle features and also making it more compatible with knowledge from other existing frameworks. In particular, we want to look at moving over to lifecycle names that are also found in React. This would be similar to the relationship between preact and React.
So as an example, we could either alias or rename
attached
tocomponentDidMount
. Or we could add new lifecycles, likecomponentWillRecieveProps
.@jbalsas @bryceosterhaus @eduardolundgren Moving this conversation here.
The text was updated successfully, but these errors were encountered: