λ§μ§λ§ 릴리μ€μμ λͺ κ°μ§ λ¬Έμ κ° μμ λμμ§λ§. μ΄ λ κ°μ§ κ²½κ³ κ° μ¬μ ν νμλ©λλ€.
Warning: Unknown prop `onTouchTap` on <span> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in span (created by EnhancedButton)
in EnhancedButton (created by ListItem)
in div (created by ListItem)
in ListItem (created by ChatMenu)
in div (created by List)
in List (created by _class)
in _class (created by ChatMenu)
in div (created by Paper)
in Paper (created by Drawer)
in div (created by Drawer)
in Drawer (created by ChatMenu)
in ChatMenu (created by ChatApp)
in div (created by ChatApp)
in ChatApp (created by Chat)
in MuiThemeProvider (created by Chat)
in Chat (created by WithWidth)
in EventListener (created by WithWidth)
in WithWidth (created by RouterContext)
in RouterContext (created by Router)
in Router (created by Root)
in e (created by Root)
in Provider (created by Root)
Warning: Unknown prop `styles` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in div (created by Paper)
in Paper (created by AppBar)
in AppBar (created by ChatRoom)
in div (created by ChatRoom)
in ChatRoom (created by ChatApp)
in div (created by ChatApp)
in ChatApp (created by Chat)
in MuiThemeProvider (created by Chat)
in Chat (created by WithWidth)
in EventListener (created by WithWidth)
in WithWidth (created by RouterContext)
in RouterContext (created by Router)
in Router (created by Root)
in e (created by Root)
in Provider (created by Root)
PRμ 보λ΄κ³ μΆμ§λ§ μ§κΈμ λ³κ²½ μ¬νμ ν μ€νΈνλ λ°©λ²κ³Ό λ³κ²½ μ¬νμΌλ‘ μΈν΄ κ²½κ³ κ° μμ λλμ§ λͺ¨λ₯΄κ² μ΅λλ€.
Yeoman Webpack λ° react: ^15.2.1
μ¬μ©
Warning: Unknown prop `onTouchTap` on <button> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in button (created by EnhancedButton)
in EnhancedButton (created by RaisedButton)
in div (created by Paper)
in Paper (created by RaisedButton)
in RaisedButton (created by MyButton)
in div (created by MyButton)
in MyButton (created by AppComponent)
in div (created by AppComponent)
in MuiThemeProvider (created by AppComponent)
in AppComponent
κ°λ¨ν κ²μμ:
import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
export default class MyButton extends React.Component {
render() {
return (
<div>
<RaisedButton>
Hello, world!
</RaisedButton>
</div>
);
}
}
ν¨ν€μ§.json:
{
...
"devDependencies": {
...
"core-js": "^2.0.0",
"material-ui": "^0.15.2",
"normalize.css": "^4.0.0",
"react": "^15.2.1",
"react-dom": "^15.0.0",
"react-tap-event-plugin": "^1.0.0"
}
}
λ€μμ μΆκ°νμ¬ μμ λμμ΅λλ€.
// Needed for onTouchTap
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
κ΅¬μ± μμμ.
μΆκ°νκ³ μΆμ΅λλ€: transitionAppearTimeout
warning.js:44 Warning: Unknown prop `transitionAppearTimeout` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in div (created by ReactTransitionGroup)
in ReactTransitionGroup (created by DialogInline)
in div (created by DialogInline)
in DialogInline
in MuiThemeProvider
Dialog
μλ§ λνλ¨
μ
λ°μ΄νΈ: μ κ²½ μ°μ§ λ§μΈμ. 15.0.0
λ°μκ³Ό ν¨κ» 15.2.1
κ° μ¬λΌμ‘μ΅λλ€. λλ κ·Έλ€μ΄ λͺ κ°μ§ μνμ μμ΄ λ²λ¦° κ² κ°μμ.
λλ ν΄λΌμ΄μΈνΈμ μλ² λͺ¨λμμ injectTapEventPlugin()
λ₯Ό νΈμΆνμ§λ§ μ¬μ ν λ€μν μμμ ν¨κ» λ§μ κ²½κ³ λ₯Ό λ°μ΅λλ€.
λ²μ :
"material-ui": "0.15.2",
"react": "15.2.1",
"react-dom": "15.2.1",
"react-tap-event-plugin": "1.0.0",
μΌλΆ κ²½κ³ :
Warning: Unknown prop `onTouchTap` on <label> tag.
Warning: Unknown props `displayBorder`, `columnNumber`, `hoverable`, `onHover`, `onHoverExit` on <td> tag.
@igl ReactDOM.render
injectTapEventPlugin()
λ₯Ό νΈμΆνλ €κ³ ν©λλ€.
@ixrock : $ ReactDOM.render
injectTapEventPlugin()
λ₯Ό νΈμΆν΄λ λ¬Έμ κ° ν΄κ²°λμ§ μμ΅λλ€(μ μ΄λ μ μκ²λ ν΄λΉλμ§ μμ).
@κΈ°λ¦¬κ³ λ‘ κ°μ λ¬Έμ =\
vendors.js:20314 Warning: Unknown prop `onTouchTap` on <button> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in button (created by EnhancedButton)
in EnhancedButton (created by RaisedButton)
in div (created by Paper)
in Paper (created by RaisedButton)
in RaisedButton
in MuiThemeProvider
λ λ μ νμ injectionTapEventPlugin() μ¬μ© μ¬λΆμ κ΄κ³μμ΄. μμ΄λμ΄κ° μμ΅λκΉ?
@tavurth μ μ μμ μΆκ°νκ³ μ€λ₯λ₯Ό μ κ±°νμ΅λλ€.
λλ μ±κ³΅μ μΌλ‘ λ€μ μ₯μμμ κ·Έκ²μ μλνμ΅λλ€.
λλ κ·Έκ²μ ReactDOM.render νμΌμ λ°°μΉνκΈ°λ‘ κ²°μ νμ΅λλ€.
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
prop titleStyleμ΄ μλ CardTitleμμ λμΌν μ€λ₯κ° νμλ©λλ€...
warning.js:44 Warning: Unknown prop `titleStyle` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in div (created by CardTitle)
in CardTitle (created by GroupAdmin)
in div (created by Card)
in div (created by Paper)
in Paper (created by Card)
in Card (created by GroupAdmin)
in span (created by GroupAdmin)
in GroupAdmin (created by Operations)
μ½λ μ‘°κ°: <CardTitle title="Group Admin" titleStyle={styles.title}/>
λ¨Έν°λ¦¬μΌ UI λ²μ : 0.15.2
μ λ§ κ³ λ§μ.
μλ νμΈμ,
λ΄ κ²μ΄ κ΄λ ¨λμ΄ μλμ§ νμ€νμ§ μμ§λ§ <Chip>
μ μ¬μ©ν λ μ΄ μ€λ₯κ° λ°μν©λλ€.
Unknown prop labelColor on <div> tag.
λλ₯Ό μν΄ λμΌ :
κ²½κ³ : νκ·Έ μ μ μ μλ
translate
μνμ΄ μμ΅λλ€. μμμμ μ΄ μνμ μ κ±°ν©λλ€.
κ·Έλ¦¬κ³ λλ μΆκ°ν©λλ€ :
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
κ·Έλ¦¬κ³ κ·Έκ²μ μλνμ§ μμ΅λλ€ π
κ°μ κ²½κ³ κ° μμ΅λλ€. λͺ κ°μ§ λλ²κΉ νμ μ΄ μ½λμμ λ°μνλ€λ κ²μ λ°κ²¬νμ΅λλ€.
const MenuLeftItem =
({text,url}) =>
<ListItem
className="menuleft-module-item"
primaryText={text}
/>
그리κ³
<AppBar
title="Admin Panel"
iconElementLeft={
<IconButton>
<NavigationClose />
</IconButton>
}
onClick={onCollapse}
/>
μ΄κ²μ λ΄ package.jsonμ λλ€.
"dependencies": {
"brace": "^0.8.0",
"d3": "^4.2.2",
"deepmerge": "^0.2.10",
"dom-value": "^1.0.1",
"form-controls": "^1.0.0",
"form-parse": "^0.1.0",
"form-urlencoded": "^1.2.1",
"formsy-material-ui": "^0.5.0",
"formsy-react": "^0.18.1",
"is-submittable": "^1.0.0",
"isomorphic-fetch": "^2.2.1",
"js-beautify": "^1.5.10",
"lodash": "^4.14.1",
"material-ui": "^0.15.4",
"muicss": "^0.7.3",
"query-string": "^4.2.2",
"radium": "^0.18.1",
"rd3": "^0.7.1",
"react": "^15.3.1",
"react-ace": "^3.1.0",
"react-diff": "0.0.6",
"react-dimensions": "^2.0.0-alpha1",
"react-dom": "^15.3.1",
"react-edit-inline": "^1.0.6",
"react-graph-vis": "0.0.3",
"react-hotkeys": "^0.9.0",
"react-modal": "^1.4.0",
"react-notification": "^6.1.0",
"react-redux": "^4.0.6",
"react-router": "^2.6.1",
"react-syntax-highlighter": "^2.0.3",
"react-tap-event-plugin": "^1.0.0",
"reactable": "^0.14.0",
"recompose": "^0.20.0",
"reduce": "^1.0.1",
"redux": "^3.0.6",
"redux-actions": "^0.11.0",
"redux-localstorage": "^0.4.0",
"redux-saga": "^0.11.0",
"redux-thunk": "^2.1.0",
"reduxerit": "^0.4.1",
"reselect": "^2.0.3",
"sha1": "^1.1.1",
"sleep-promise": "^2.0.0",
"squares": "^0.2.1",
"uuid": "^2.0.2",
"vis": "^4.16.1"
}
}
injectTapEventPlugin()
λ₯Ό μΆκ°ν΄λ λ¬Έμ κ° ν΄κ²°λμ§ μμμ΅λλ€.
λλ κ·Έκ²μ΄ λ°μ HMR νλ¬κ·ΈμΈκ³Ό κ΄λ ¨μ΄ μλ€κ³ μκ°ν©λλ€.
λ°μμ UMD λ²μ μ¬μ©μμ λͺ¨λ κ²μ webpack-ingμΌλ‘ μ ννμ¬ μ΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€. react-tap-event-plugin λ° material-uiμ μΌλΆ μ½€λ³΄κ° Reactμ λΉκ³΅κ° λ΄λΆμ λλ¬ν΄μΌ νκ³ UMD λ²μ μμλ μ΄ μμ μ μνν μ μκΈ° λλ¬Έμ μ΄κ²μ΄ μμ λ κ²μ΄λΌκ³ μκ°ν©λλ€. νμ¨μ μ¬λ€...
μ€λ²λ μ΄μ λν΄ λμΌν κ²½κ³ κ° μμ΅λλ€.
Warning: Unknown prop `onTouchTap` on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in div (created by Overlay)
in Overlay (created by DialogInline)
in div (created by DialogInline)
in DialogInline
λν μ¬κΈ° https://github.com/facebook/react/issues/436 μμ react-tap-event-pluginμ΄ λ°μ 15 μ΄ν μ κ±°λ μ μλ€λ κ²μ μ½μμ΅λλ€. μ‘°μ¬κ° νμν©λλ€.
@tavurthμ μν΄ κ·Όλ³Έ λ¬Έμ κ° μλ³λμμΌλ―λ‘ μ΄ λ¬Έμ λ₯Ό μ’ λ£ν©λλ€. κ°μ¬ ν΄μ!
μ°λ¦¬λ onTouchTap
μμ±μ μΆκ°νκΈ° μν΄ react-tap-event-plugin
μ μμ‘΄ν©λλ€.
μ¬μ€, Reactκ° μ΄ κ²½κ³ λ₯Ό μΆκ°ν΄μ κΈ°μ©λλ€. λ¬Έμμμ μ΄ μμ μ λμΉλ λ§μ μ¬λλ€μκ² λμμ΄ λ κ²μ
λλ€.
μμΌλ‘ next
λΆκΈ°μμ μ΄ μ’
μμ±μ μ κ±°ν κ³νμ
λλ€.
μ΅μ λͺ¨λ°μΌ μ₯μΉκ° λ μ μ§μνκΈ° λλ¬Έμ onClick
μ΄λ²€νΈλ₯Ό μ¬μ©ν©λλ€(μ§μ° μμ).
λλ AppBarλ₯Ό μ¬μ©νκ³ μμκ³ λ€μμ μμ μ£Όμμ λ°λΌ μ΄ λ¬Έμ λ₯Ό ν΄κ²°νλ λ° μ¬μ©νλ μ½λμ λλ€.
const Header = React.createClass({
handleClick(e){
console.log("reached here::");
},
render(){
injectTapEventPlugin();
return <AppBar title="Some Heading" onTitleTouchTap={this.handleClick()}/>
}
});
export default Header;
μ΄ λ¬Έμ λ₯Ό λ°κ²¬νκ³ μμ μ¬νμ μ μ©νκ³ λ¬Έμ κ° μ§μλλ μ μ κ°μ μ¬λλ€μ μν΄: injectTapEventPlugin()
μ€νμ λν μ μλ μ κ·Ό λ°©μμ WebPackμ μ¬μ©νλ κ²½μ°μλ§ μλν©λλ€. λ΄ μ±μ browserifyμμ webpackμΌλ‘ λ³κ²½νκ³ μ½λλ₯Ό λ³κ²½νμ§ μμμΌλ©° μ€λ₯κ° μ¬λΌμ‘μ΅λλ€.
λꡬλ μ§ μ¬κΈ°μ 무μμ μν΄ μ£Όμ ν μ΄λ²€νΈ νλ¬κ·ΈμΈ()μ΄ μλμ§ λ§ν΄ μ€ μ μμ΅λκΉ?
@jakewins : λλ browserifyμ κ°μ λ¬Έμ κ° μμμ΅λλ€. λ¬Έμ λ λ΄κ° μ 체 ν΄λΌμ΄μΈνΈ μ½λλ‘ vendor.jsμ νλμ js νμΌμ λ§λ€κ³ μλ€λ κ²μ λλ€. λλ react-event-tap-pluginμ΄ λΉμ μ react libκ° μλ js νμΌ μμ λ²λ€λμ΄μΌ νλ€λ κ²μ μκ² λμμ΅λλ€. μ΄ μ κ·Ό λ°©μμ browserifyμ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€.
κ°μ λ¬Έμ μ λλ€. @vaspoz
react-tap-event-pluginμ΄ ^2.0.0κΉμ§ μ¬λΌκ°κ³ λ°μμ΄ 15.4.0μ λλ¬νλ κ²κ³Ό κ΄λ ¨μ΄ μλ κ² κ°μ΅λλ€. UMD λΉλλ₯Ό μ¬μ©νκ³ ReactDOM.render μ΄μ μ injectTapEventPluginμ νΈμΆνκ³ μμ΅λλ€.
λΉ UMD λΉλλ₯Ό μ¬μ©νλ κ²μ λΆννλ μ΅μ μ΄ μλλλ€.
react + react-tap-event-plugin + material-uiμ UMD λ²μ μ‘°ν©μ΄ μλνλ μ¬λμ΄ μμ΅λκΉ?
@oliviertassinari λ λ§μ λ€μ΄ν°λΈ onClickμ΄ μλ λ€μ λΈλμΉλ₯Ό μ¬μ©ν΄λ μΆ©λΆν μμ μ μΌκΉμ? λ°μ―€ μ¬μ©ν μ μλ ν λ§μ κ²μ΄ λ§κ°μ Έλ μκ΄ μμ΅λλ€.
λ λ§μ λ€μ΄ν°λΈ onClickμ΄ μλ λ€μ λΆκΈ°λ₯Ό μ¬μ©νλ κ²μ΄ μΆ©λΆν μμ μ μ λκΉ?
@vans163 λ€μμ next
λΆκΈ°μ 1κ°μ λ λ²μ μ
λλ€. http://material-ui-next.azurewebsites.net/. μμ μ΄ λ¬΄μμ μλ―Ένλμ§μ λ°λΌ λ€λ¦
λλ€.
νμν κ²½μ° APIκ° λ³κ²½λ©λλ€. μΌλΆ κ΅¬μ± μμλ§ λ§μ΄κ·Έλ μ΄μ
λμμΌλ©° μ’
μ’
λΆλΆμ μΌλ‘ λ§μ΄κ·Έλ μ΄μ
λμμ΅λλ€. κ·Έλλ μ΄ λΆκΈ°λ₯Ό 100% μ¬μ©νλλ‘ μ±μ λ§μ΄κ·Έλ μ΄μ
νκ³ μμ΅λλ€.
μ 릴리μ€κ° μ€λΉλ λκΉμ§ λκ΅°κ°μκ² λμμ΄ λλ κ²½μ°λ₯Ό λλΉνμ¬: μ΄ λ¬Έμ κ° λ°μνμ§λ§ μΌλ¨
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
κ΅¬μ± μμ κ³μΈ΅μμ <MuiThemeProvider>
λ₯Ό μ μ©νλ κ΅¬μ± μμ νμΌμ μ€μ μΆκ°νλ©΄ μλνκΈ° μμνμ΅λλ€. (λν reduxμ λν mapStateToPropsλ₯Ό μννλ κ³³μ΄κΈ°λ νμ§λ§ κ΄λ ¨μ΄ μλ€κ³ κ°μ ν©λλ€.) μ΄μ μ λν κ΅¬μ± μμ μν μ νλ μμ κ΅¬μ± μμμ νμΌμ μ μ©ν μ μ΄ μμ΅λλ€.
create-app-react
μμ κΊΌλΈ μΉν©μ μ¬μ©νκ³ μμ΅λλ€.
@rdnewman μλν©λλ€!!
μ λ§ κ³ λ§μ΅λλ€!
λͺ¨λ κ°μ¬ν©λλ€ ... ν
μ€νΈμμλ§μ΄ κ²½κ³ κ° μμκ³ κ΅¬μ± μμλ₯Ό ν
μ€νΈνλ κ³Όμ μμ injectTapEventPlugin()
κ° νΈμΆλμ§ μκ³ μμ ν μ±μμλ§ νΈμΆλμμμ κΉ¨λ¬μμ΅λλ€.
@rdnewman , κ°μ¬ν©λλ€! λΉμ μ λ°©λ²μ΄ μλν©λλ€. λλ κ·Έκ²μ ReactDOM.render λ©μλ νμΌμ΄ ν¬ν¨λ index.js νμΌμ λ£μκ³ κ·Έκ²μ λν κ·Έλ κ² μλνμ΅λλ€. π
μ§λ μ£Όμ create-react-app
λ₯Ό μ¬μ©νμ¬ μ΄κ²μ΄ λμμ΅λλ€. Reactλ 15.4.xμ λ€μ΄μκ³ μ΄ μ€λ₯λ injectTapEventPlugin()
μ μ νκ² νΈμΆνμμλ λΆκ΅¬νκ³ λ°μν©λλ€. μ΄κ²μ react-tap-event-plugin #85 μμ λ
Όμλ©λλ€. 2.0.0
react-tap-event-plugin
λ₯Ό μλμΌλ‘ μ μ₯/μ€μΉνλ©΄ μ΄ λ¬Έμ κ° ν΄κ²°λμμ΅λλ€.
typescriptλ₯Ό μ¬μ©νλ λκ΅°κ°λ₯Ό λκΈ°λ₯Ό λ°λλλ€.
typescriptμ ν¨κ» material-uiλ₯Ό μ¬μ©νκ³ μλλ° λμΌν λ¬Έμ κ° μμ΅λλ€.
μΆκ° ν
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
ReactDOM.render μ μ μ½λμμ μ€λ₯κ° λ°μν©λλ€.
μ‘νμ§ μμ TypeError: react_tap_event_plugin_1.defaultλ ν¨μκ° μλλλ€.
κ°μ Έμ€κΈ° μ€νμΌμ λ³κ²½νμ¬ ν΄κ²°λμμ΅λλ€.
import * as injectTapEventPlugin from 'react-tap-event-plugin';
κ°μ¬ν©λλ€. μμ¦μλ react-tap-event-plugin λ²μ 2.0.1κ³Ό react 15.4.2λ§ μ€μΉνλ©΄ λ©λλ€. κ·Έλ° λ€μ μ±μ λ λλ§νλ νμΌλ‘ μ΄λνμ¬ λ€μ λ μ€λ§ ν¬ν¨νλ©΄ λ©λλ€.
'react-tap-event-plugin'μμ injectTapEventPluginμ κ°μ Έμ΅λλ€.
μ£Όμ
νμ΄λ²€νΈνλ¬κ·ΈμΈ();
κ·Έλ¦¬κ³ λ°λ‘ π
@erick2014 λ€ : http://www.material-ui.com/#/get-started/installation
λ΅λ΅ν μ λλ‘ λͺ¨νΈν λ¬Έμ . SSR μλ리μ€μμ μΌλΆ μ½λ μ¬κ΅¬μ±μ μνν ν λμμμ΅λλ€.
"λ°μ"μ κ²½μ°: "15.4.2",
"react-tap-event-plugin": "^2.0.0" λλ react-tap-event-plugin": "^2.0.1"μ μ¬μ©νμΈμ.
κ·Έλ¦¬κ³ μ΄κ²μ μΆκ°
// onTouchTapμ νμ
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
injectionTapEventPlugin() κ°μ Έμ€κΈ° λ° μΆκ°λ‘ λ΄ λ¬Έμ κ° ν΄κ²°λμμ΅λλ€.
import injectTapEventPlugin from 'react-tap-event-plugin;
componentWillMount(){
injectTapEventPlugin();
}
Next.JSλ₯Ό μ¬μ©νκ³ μμ΅λλ€.
μ΄ μ루μ μ μλνμ§ μμ΅λλ€. κ° νμ΄μ§λ₯Ό κ°μ Έμ€λ tap_events.js νμΌμ΄ μμ΅λλ€.
λ΄ νμΌ tap_events.js:
'react-tap-event-plugin'μμ insertTapEventPlugin κ°μ Έμ€κΈ°
if (μ°½ μ ν !== 'μ μλμ§ μμ') μ£Όμ
TapEventPlugin()
κ°μ₯ μ μ©ν λκΈ
λ€μμ μΆκ°νμ¬ μμ λμμ΅λλ€.
κ΅¬μ± μμμ.