pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interpolated Tag

cihanzenginff opened this issue · comments

Hello, i'm using some validation plugin.

and want to show message like that in jsx:

{this.validator.message("title", this.state.title, "required|alpha")}

i tried like that:

#{this.validator.message("title", this.state.title, "required|alpha")}

but getting error: Error: InterpolatedTag is not yet supported

it's mean i can't use it not yet ?

If this.validator.message returns a component:

- const Message = this.validator.message("title", this.state.title, "required|alpha");
Message

If this.validator.message returns a jsx element or string:

= this.validator.message("title", this.state.title, "required|alpha");

worked perfectly thanks