Skip to main content
Bumped by Community user
Bumped by Community user
clarify
Source Link
mustaqim
  • 47
  • 1
  • 6

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}" "props"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After completing itchoosing {}, how do I place itthe cursor between the brackets, i.e {_} brackets?


An example of a completed snippet:


import React from 'react'

const Notification = ({ message }) => {
  return (
    <div className='error'>
      {message}
    </div>
  )
}

export default Notification

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}" "props"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After completing it, how do I place it between the {_} brackets?

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}" "props"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After choosing {}, how do I place the cursor between the brackets, i.e {_}?


An example of a completed snippet:


import React from 'react'

const Notification = ({ message }) => {
  return (
    <div className='error'>
      {message}
    </div>
  )
}

export default Notification
Add missing item
Source Link
mustaqim
  • 47
  • 1
  • 6

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}" "props"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After completing it, how do I place it between the {_} brackets?

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After completing it, how do I place it between the {_} brackets?

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}" "props"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After completing it, how do I place it between the {_} brackets?

Source Link
mustaqim
  • 47
  • 1
  • 6

How do I move the cursor back after completing yas-choose-value?

I have a snippet set like so:

import React from 'react'

const ${1:$$(file-name-base)} = ( ${2:$$(yas-choose-value '("\{ \}"))} ) => {
  return (
    $0
)
}

export default $1

If I choose {}, the cursor moves to the right of it. After completing it, how do I place it between the {_} brackets?