Title: Remove bindMethods in favor of Class properties · Issue #294 · patternfly/patternfly-react · GitHub
Open Graph Title: Remove bindMethods in favor of Class properties · Issue #294 · patternfly/patternfly-react
X Title: Remove bindMethods in favor of Class properties · Issue #294 · patternfly/patternfly-react
Description: Class properties are on their way to making it into the spec. Moving to them will also align us better with the greater React community since many projects have adopted this syntax. Example of the change is below: Before class SomeCompon...
Open Graph Description: Class properties are on their way to making it into the spec. Moving to them will also align us better with the greater React community since many projects have adopted this syntax. Example of the ...
X Description: Class properties are on their way to making it into the spec. Moving to them will also align us better with the greater React community since many projects have adopted this syntax. Example of the ...
Opengraph URL: https://github.com/patternfly/patternfly-react/issues/294
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove bindMethods in favor of Class properties","articleBody":"Class properties are on their way to making it into the spec. Moving to them will also align us better with the greater React community since many projects have adopted this syntax. Example of the change is below:\r\n### Before\r\n```jsx\r\nclass SomeComponent extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isLoading: false,\r\n };\r\n bindMethods(this, ['handleClick']);\r\n }\r\n handleClick() {}\r\n}\r\n```\r\n### After\r\n```jsx\r\nclass SomeComponent extends Component {\r\n state = {\r\n isLoading: false,\r\n };\r\n handleClick = () => {}\r\n}\r\n```\r\n[TC39 Proposal](https://github.com/tc39/proposal-class-fields)\r\n[Stage Explanations](https://tc39.github.io/process-document/)\r\n","author":{"url":"https://github.com/dmiller9911","@type":"Person","name":"dmiller9911"},"datePublished":"2018-04-02T15:53:33Z","url":"https://github.com/patternfly/patternfly-react/issues/294"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0ef8ee7e-df5c-63c3-8906-64ef21c07b8d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED72:1EC1E3:996A5:D5C51:6B007F77 |
| html-safe-nonce | 8c9926398510a082a5c300f70dc9baf572b28b8429fd834c7c8d04577d626236 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDcyOjFFQzFFMzo5OTZBNTpENUM1MTo2QjAwN0Y3NyIsInZpc2l0b3JfaWQiOiI0NDU1MTE0OTAzMDAyMzE2NjYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3ee978b039dd223cbb6f51f8efdc966aa12f8d50e00decd3b4cb457e90bc7c68 |
| hovercard-subject-tag | issue:310522835 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/patternfly/patternfly-react/294/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54a0170679e13063d8e07510e3d61cfb4d0fabc3d850a9a0d9d09ddfc4b57ed7/patternfly/patternfly-react/issues/294 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54a0170679e13063d8e07510e3d61cfb4d0fabc3d850a9a0d9d09ddfc4b57ed7/patternfly/patternfly-react/issues/294 |
| og:image:alt | Class properties are on their way to making it into the spec. Moving to them will also align us better with the greater React community since many projects have adopted this syntax. Example of the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dmiller9911 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83 |
| turbo-cache-control | no-preview |
| go-import | github.com/patternfly/patternfly-react git https://github.com/patternfly/patternfly-react.git |
| octolytics-dimension-user_id | 6391110 |
| octolytics-dimension-user_login | patternfly |
| octolytics-dimension-repository_id | 84372347 |
| octolytics-dimension-repository_nwo | patternfly/patternfly-react |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 84372347 |
| octolytics-dimension-repository_network_root_nwo | patternfly/patternfly-react |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1bc2aa1939001689f5ce935982c10a6138f745c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width