Skip to content

Standardise format of the three "state" questions.#7046

Merged
zpao merged 2 commits intofacebook:masterfrom
cbrandolino:patch-1
Jun 16, 2016
Merged

Standardise format of the three "state" questions.#7046
zpao merged 2 commits intofacebook:masterfrom
cbrandolino:patch-1

Conversation

@cbrandolino
Copy link
Copy Markdown
Contributor

The original format follows the template:

  1. x? if x then probably isn't state
  2. y? if !y then probably is state
  3. z? if z then it's not state

This caused both me and a hallway tester to do a double take.

The proposed reformulation allows the answers to follow the same template.

In the same spirit, it uses the same contraction pattern in the last answer (it's not state-> it isn't state). This has the welcome side effect to make the lack of "probably" stand out more.

The original format follows the template:

 > 1. x? if `x` then probably isn't state
 > 2. y? if `!y` then probably isn't state
 > 3. z? if `z` then it's not state

This caused both me and a hallway tester to do a double take.

The proposed reformulation allows the answers to follow the same template.

In the same spirit, it uses the same contraction pattern in the last answer (`it's not state`-> `it isn't state`). This has the welcome side effect to make the lack of "probably" stand out more.
Comment thread docs/docs/thinking-in-react.md Outdated
1. Is it passed in from a parent via props? If so, it probably isn't state.
2. Does it change over time? If not, it probably isn't state.
3. Can you compute it based on any other state or props in your component? If so, it's not state.
2. Does it remain the same over time? If so, it probably isn't state.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"remain the same over time" feels a bit odd to me, though I can't put my finger on exactly why. I read it and I'm like "what does that mean?"

Perhaps: "Is it a constant value that never changes? If so, it probably isn't state."

Copy link
Copy Markdown
Contributor Author

@cbrandolino cbrandolino Jun 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid negatives in the question, but I see how that phrasing might sound clunky.

@jimfb Would you go with "Does it remain constant over time"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Does it remain constant (immutable) over time? If so, it probably isn't state." I feel like "constant" is better than "remain the same" but is still a little vague.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about "does it stay constant over time"? The "stay" helps bringing home the idea I think.

At any rate, the "no-negatives" wasn't dogmatic. "Does it remain unchanged over time" is also fine for me. Let me know which one you prefer and I'll edit accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think "Does it remain unchanged over time" reads the best. I think I'd go with that one.

@ghost
Copy link
Copy Markdown

ghost commented Jun 16, 2016

@cbrandolino updated the pull request.

@jimfb
Copy link
Copy Markdown
Contributor

jimfb commented Jun 16, 2016

Looks good, thanks @cbrandolino!

@zpao zpao merged commit 5bca377 into facebook:master Jun 16, 2016
zpao pushed a commit that referenced this pull request Jun 20, 2016
* Standardise format of the three "state" questions.

The original format follows the template:

 > 1. x? if `x` then probably isn't state
 > 2. y? if `!y` then probably isn't state
 > 3. z? if `z` then it's not state

This caused both me and a hallway tester to do a double take.

The proposed reformulation allows the answers to follow the same template.

In the same spirit, it uses the same contraction pattern in the last answer (`it's not state`-> `it isn't state`). This has the welcome side effect to make the lack of "probably" stand out more.

* Update phrasing in thinking in reacr

(cherry picked from commit 5bca377)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants