Skip to content

Split React components into logical and representational #1405

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

Closed
php-coder opened this issue May 23, 2020 · 1 comment · Fixed by #1406
Closed

Split React components into logical and representational #1405

php-coder opened this issue May 23, 2020 · 1 comment · Fixed by #1406
Assignees
Labels
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented May 23, 2020

From each component FooForm, we should extract FooFormView that contains only HTML markup. All the methods and state should remain in FooForm and in its render() method should use <FooFormView />

@php-coder php-coder added this to the 0.4.4 milestone May 23, 2020
@php-coder php-coder self-assigned this May 23, 2020
@php-coder php-coder added the estimation/1h Estimated time: 60 minutes label May 23, 2020
@php-coder
Copy link
Owner Author

@bahoss Hi, could you apply similar changes to other components? Here is the example: d29390e

A few notes:

  • in *View component, we should extract variable from props in the begging of the render()
  • don't touch this.props.l10n, leave them as-is (to reduce diff)
  • when you modify a line and see that it uses foo={something} you can also add a spaces around: foo={ something } (but don't modify existing code just for that)

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

Successfully merging a pull request may close this issue.

2 participants