Skip to content

acyuta108/vim-relay-es6-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

vim-relay-es6-snippets

A set of snippets for Vim to work with Facebook's Relay library.

Requires vim-snipmate.

Use along vim-react-es6-snippets. Thanks Ben!

Installation

Use your preferred Vim plugin installation method. Vundle or Pathogen should be fine (I use Pathogen).

Usage

Within any Javascript or JSX file, you should be able to do the following:

(in insert mode)

rcc<Tab>

expanding to

export default Relay.createContainer(Component, {
  fragments: {
    propName: () => Relay.QL`
      fragment on _ComponentConnection {
        count,
        edges {
          node {
            id,
            text,
            ${ChildComponent.getFragment('child')}
          }
        }
      }
    `
  },
});

Current list of snippets

relcc Relay.createContainer

relmut Relay.Mutation

relgf getFragment

relfrag fragment

relfragconn fragment on connection

relsu Relay.Store.update

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published