Shota Shota - 1 year ago 185
Javascript Question

How to chain predefined functions in Webstorm live template variables

I am trying to give a name to a React component, based on a file name. E.g. if file name is test-comp.js component should be named as TestComp.

Thus I want to call built in functions of live templates this way:


However it does not work. I also tried doing it from 'Edit variables' window, but looks like I can only add one function expression there. Any suggestions?

Answer Source

This has to be done in Edit Template Variables window; you can enter as many functions as you like there (but, of course, you have to type them - you can't enter complex expressions by selecting function from dropdown):

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download