Hacker News new | ask | show | jobs
by thomasfl 3219 days ago
Have you tried making an alias for react with the library preact-compat in webpack config? It should make a lot of react libraries work seamlessly with preact too.
1 comments

Yes that works in most cases but I strive not to use preact-compat - like to keep things lightweight.
Yep, it works just fine without Preact's compatibility layer:

  import {h, Component} from 'preact'
  import {ReactHintFactory} from 'react-hint'
  import 'react-hint/css/index.css'

  const ReactHint = ReactHintFactory({createElement: h, 
  Component})