trivago/melody

melody-hooks requires using melody-component for rendering root component

开放

#76 创建于 2018年11月20日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (37 个派生)auto 404
enhancementgood first issuehelp wanted

仓库指标

星标
 (216 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Explain the problem

When trying to mount a root component written using the melody-hooks API, we still need to rely on melody-component in order to render the root component.

Expected Behaviour

There is a way to render a top-level component from melody-hooks without having to rely on melody-component.

import { render } from 'melody-hooks';
import home from './home';

const documentRoot = document.getElementById('root');
render(documentRoot, home, {
    message: 'Welcome to Melody!'
});

Actual Behaviour

The only way to render a top-level melody-hooks component is by using render from melody-component.

import { render } from 'melody-component';
import home from './home';

const documentRoot = document.getElementById('root');
render(documentRoot, home, {
    message: 'Welcome to Melody!'
});

Provide your Environment details

  • melody version: 1.2.0-0

贡献者指南