@creatorqsf/yield
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

pkg yield

yield is a complement patch for Riot.js v4 which lacks some of the features implemented with <yield /> in Riot.js v3.

Actions Status

Installation

For npm user,

$ npm install @creatorqsf/yield

For yarn user,

$ yarn add @creatorqsf/yield

Usage

In your bundle file (like app.js) which register riot component or mount them, add some following lines.

import yf from '@creatorqsf/yield'

riot.install(yf)

Then in your component file (like my-tag.riot), write <yield /> whereever you want it.

<my-tag>
  <some-tag-even-nested>
    <yield />
  </some-tag-even-nested>
</my-tag>

A simple nested example is in _example/nested directly. You can play with it by $ ./run.sh.

Motivation and Issues of Riot v4

See these two issues:

Riot v4 inserts elements which exists in pre-mounted element without · Issue #2773 · riot/riot

Riot v4 inserts the elements not in · Issue #2774 · riot/riot

Author

たふみ(CreatorQsF)

License

MIT

Package Sidebar

Install

npm i @creatorqsf/yield

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

5.01 kB

Total Files

6

Last publish

Collaborators

  • creatorqsf