Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Rename 'Roact.teardown' to 'Roact.unmount' #82

Closed
LPGhatguy opened this issue May 7, 2018 · 3 comments
Closed

Rename 'Roact.teardown' to 'Roact.unmount' #82

LPGhatguy opened this issue May 7, 2018 · 3 comments
Assignees
Milestone

Comments

@LPGhatguy
Copy link
Contributor

Having two terms for this in the documentation is kind of confusing.

We can introduce a warning for the teardown alias but keep it through 1.0.

@LPGhatguy LPGhatguy added this to the 1.0 milestone May 7, 2018
@LPGhatguy
Copy link
Contributor Author

LPGhatguy commented May 7, 2018

Should we also rename Roact.reify to Roact.mount?

How about Roact.reconcile to Roact.update?

@AmaranthineCodices
Copy link
Contributor

I think renaming these methods (with warnings for the old names) is a good idea - it makes it a little easier to explain and reason about what's going on. The way I think of it:

  • Roact itself reifies / reconciles / tears down components.
  • Roact users cause Roact to do these things by mounting / updating / unmounting components.

IMO, reification/reconciliation are internal terms that Roact users shouldn't need to worry about unless they're going to dig into internals!

@LPGhatguy
Copy link
Contributor Author

After a little talk internally, I'm hesitant to change reconcile to update but I'm still comfortable with the other two changes.

The reason here is that update is sort of a vague term, and talking about reconciliation is a healthy part of learning what Roact is and how you should work with it. It also means our diagnostics can stay very precise about what phase they're referring to ("update phase" is super vague).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants