Preact: How to integrate material-ui with preact

Created on 29 Apr 2017  路  3Comments  路  Source: preactjs/preact

I'm trying to use material-ui and I'm getting react-dom errors, preact-compact is the solution for this?

Most helpful comment

Ah yes, you'll need to alias that out for preact-tap-event-plugin in webpack.config.babel.js:

{
  resolve: {
    alias: {
      'react-tap-event-plugin': 'preact-tap-event-plugin'
    }
  }
}

All 3 comments

yes, material-ui uses React-specific APIs like findDOMNode(), Children.*() and String refs. It should work fine with preact-compat. Let me know if that's not the case and we can re-open :)

Ok thanks, checking again I see that the problem is not with material-ui, but yes with react-tap-event-plugin for handle touch / tap / clickevents in material-ui http://www.material-ui.com/#/get-started/installation, I am using preact-boilerplate which has already included all preact-compat settings, see the error in the screenshot
error.
Why this error?

Ah yes, you'll need to alias that out for preact-tap-event-plugin in webpack.config.babel.js:

{
  resolve: {
    alias: {
      'react-tap-event-plugin': 'preact-tap-event-plugin'
    }
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

KnisterPeter picture KnisterPeter  路  3Comments

nopantsmonkey picture nopantsmonkey  路  3Comments

jasongerbes picture jasongerbes  路  3Comments

matuscongrady picture matuscongrady  路  3Comments

Zashy picture Zashy  路  3Comments