单击一个组件可在主干环境中更改另一个组件

时间:2018-07-02 13:08:15

标签: javascript backbone.js marionette

因此,我有一个 button 组件...

import "./button.scss";

const button = '<button class="btn">Button</button>';

export default button;

单击后,我想更改此 article 组件的类...如何以最有效的方式实现?

import "./article.scss";

const article = `<article class="article">
    <h1>Sharing variables between JS and Sass using webpack sass-loader</h1>
    <p>This is the GitHub repo and project files for the article on how to share variables between JS and Sass using webpack and sass-loader.</p>
    <p><a href="https://medium.com/@paul.motionimaging/sharing-variables-between-js-and-sass-using-webpack-sass-loader-713f51fa7fa0
">Read the full article</a>
  </article>`;

export default article;

0 个答案:

没有答案