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

Migrate to pure components where possible #80

Merged
merged 2 commits into from
Jun 5, 2017

Conversation

brendo
Copy link
Contributor

@brendo brendo commented Jun 1, 2017

This MR cleans up the components to be pure where possible. It reduces the amount of wasted time reported by the Perf tools down from 27 elements to just 8.

By accident, this also improves #31, as the active item will now update as the user scrolls down the page. Note that it will not automatically expands the tags, but that should be possible!

  • We had a lot of unnecessary binds in constructors. This only happens when the context actually changes before the function is called, such as an event handler.
  • setState automatically merges state, there is no need to use destructuring.
  • Make better use of destructuring for brevity.

@quangkhoa quangkhoa merged commit 6cbaeaf into temando:master Jun 5, 2017
@brendo brendo deleted the pure-components branch June 5, 2017 08:48
brendo pushed a commit to brendo/open-api-renderer that referenced this pull request Jun 20, 2017
Migrate to pure components where possible
brendo pushed a commit to brendo/open-api-renderer that referenced this pull request Jun 20, 2017
Migrate to pure components where possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants