How to use the @egoist/vue-to-react function in @egoist/vue-to-react

To help you get started, we’ve selected a few @egoist/vue-to-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github egoist / vue-timeago / example / index.js View on Github external
locales,
  converter
})

const demoboard = create()

demoboard.section('Examples').add('Basic Usage', {
  component: toReact(BasicUsage),
  readme: BasicUsage.$readme,
  code: BasicUsage.$code
}).add('Auto Update', {
  component: toReact(AutoUpdate),
  readme: AutoUpdate.$readme,
  code: AutoUpdate.$code
}).add('Custom Converter', {
  component: toReact(CustomConverter),
  readme: CustomConverter.$readme,
  code: CustomConverter.$code
})

mount(demoboard, '#app', {
  title: 'Vue Timeago',
  readme
})
github evergarden-ui / evergarden / packages / evergarden / demoboard / index.js View on Github external
demoboard.addDecorator(item => {
  const Component = item.options.component
  item.options.component = toReact({
    render(h) {
      return h('div', {
        class: 'component-decorator'
      }, [h(CSSReset), h(Component)])
    }
  })
})
github egoist / vue-timeago / example / index.js View on Github external
})

Vue.use(Timeago, {
  locale: 'en',
  locales,
  converter
})

const demoboard = create()

demoboard.section('Examples').add('Basic Usage', {
  component: toReact(BasicUsage),
  readme: BasicUsage.$readme,
  code: BasicUsage.$code
}).add('Auto Update', {
  component: toReact(AutoUpdate),
  readme: AutoUpdate.$readme,
  code: AutoUpdate.$code
}).add('Custom Converter', {
  component: toReact(CustomConverter),
  readme: CustomConverter.$readme,
  code: CustomConverter.$code
})

mount(demoboard, '#app', {
  title: 'Vue Timeago',
  readme
})
github egoist / vue-timeago / example / index.js View on Github external
const locales = {}
r.keys().forEach(v => {
  const [, name] = /^\.\/([\w\_]+)\/index\.js/.exec(v)
  locales[name] = r(v)
})

Vue.use(Timeago, {
  locale: 'en',
  locales,
  converter
})

const demoboard = create()

demoboard.section('Examples').add('Basic Usage', {
  component: toReact(BasicUsage),
  readme: BasicUsage.$readme,
  code: BasicUsage.$code
}).add('Auto Update', {
  component: toReact(AutoUpdate),
  readme: AutoUpdate.$readme,
  code: AutoUpdate.$code
}).add('Custom Converter', {
  component: toReact(CustomConverter),
  readme: CustomConverter.$readme,
  code: CustomConverter.$code
})

mount(demoboard, '#app', {
  title: 'Vue Timeago',
  readme
})

@egoist/vue-to-react

Turn a Vue component into a React component.

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular @egoist/vue-to-react functions

Similar packages