Title: Mixins use problem with React · Issue #6147 · microsoft/TypeScript · GitHub
Open Graph Title: Mixins use problem with React · Issue #6147 · microsoft/TypeScript
X Title: Mixins use problem with React · Issue #6147 · microsoft/TypeScript
Description: Hello, I'm trying to use mixins with React. The compiler tells me that I try to reefined as property some features which are functions... Here is the code : import * as React from "react" import * as ReactDom from "react" import {ClassGe...
Open Graph Description: Hello, I'm trying to use mixins with React. The compiler tells me that I try to reefined as property some features which are functions... Here is the code : import * as React from "react" import * ...
X Description: Hello, I'm trying to use mixins with React. The compiler tells me that I try to reefined as property some features which are functions... Here is the code : import * as React from "react&q...
Mail addresses
notifications@github.com
notifications@github.com
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6147
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mixins use problem with React","articleBody":"Hello,\n\nI'm trying to use mixins with React. The compiler tells me that I try to reefined as property some features which are functions... Here is the code :\n\n```\n import * as React from \"react\"\nimport * as ReactDom from \"react\"\nimport {ClassGenerator} from \"../mixins/classgenerator\"\nimport {applyMixins} from \"../mixins/mixins\"\n\n\n\nexport class Component\u003cC,S> extends React.Component\u003cC,S> implements ClassGenerator {\n constructor(props) {\n super(props); \n }\n\n //mixins generic\n setState : (any) =>any //PB\n forceUpdate : ()=>void //PB\n render : () =>any //PB\n props : any\n state:any\n context:any\n refs: any\n key: any\n\n //mixin classgenerator\n getClassName : (string, any) => string \n}\n```\n\nwith classGenerator \n\n```\ninterface Props extends React.Props\u003cClassGenerator>{\n className: string;\n}\n\nexport class ClassGenerator extends React.Component\u003cProps, {}>{\n\n getClassName(defaultClassName, addClassName) : string {\n let classResult = defaultClassName;\n\n if (typeof this.props.className !== 'undefined') { \n classResult += ' ' + this.props.className;\n }\n\n if (typeof addClassName !== 'undefined') {\n if (typeof addClassName === 'object') {\n classResult += ' ' + classNames(addClassName);\n } else {\n classResult += ' ' + addClassName;\n }\n }\n\n return classResult;\n }\n};\n```\n\nany clue?\n","author":{"url":"https://github.com/xmehaut","@type":"Person","name":"xmehaut"},"datePublished":"2015-12-18T11:27:04Z","url":"https://github.com/microsoft/TypeScript/issues/6147"}
| 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:24f9b3ed-ea9d-467f-7e1e-41fa0dffa2e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C170:11EACE:2451C47:3077E95:6B0199EF |
| html-safe-nonce | c7c88fac52aedeb83376faadc580c645b0e993dbc54874c30e18d31c016b2628 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTcwOjExRUFDRToyNDUxQzQ3OjMwNzdFOTU6NkIwMTk5RUYiLCJ2aXNpdG9yX2lkIjoiNzY4Njg1OTc0MjA0NzczODM1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 09fe91ec327de4c04646f645f2a6cfce1e9785512bc4a65a76c2aa08c4b05d06 |
| hovercard-subject-tag | issue:122931489 |
| 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/microsoft/TypeScript/6147/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2d5ec4f2b4b65f6b1bc820e9e47b8a2980dc6428c47ae7f34749f7b7598dadba/microsoft/TypeScript/issues/6147 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2d5ec4f2b4b65f6b1bc820e9e47b8a2980dc6428c47ae7f34749f7b7598dadba/microsoft/TypeScript/issues/6147 |
| og:image:alt | Hello, I'm trying to use mixins with React. The compiler tells me that I try to reefined as property some features which are functions... Here is the code : import * as React from "react" import * ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xmehaut |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width