3

I'd like to create TAGS tables for JavaScript ES6 code using React like the following:

import React from 'react'
import { observer } from 'mobx-react'
import { Formik, Form, Field } from 'formik'
import { Auth_context } from './auth-state-control'
import { Link, withSiteData } from 'react-static'

import '../../styles/login.css'

export const UserLogin_form = observer(() => (
  <Auth_context.Consumer>
    {auth_store => (
    // TODO: Formik is not used yet here.
      <Formik>
          <div className="login-routine">
              <Link to='/'><i className="forward-arrow"></i></Link>
              <form method="POST">
                  <h2>Login with email</h2>
                  <div>
                     <input type="email" name="email" required />
                     <span className="floating-label email">Email</span>
                  </div>
                  <div>
                      <input type="password" name="password" required/>
                      <span className="floating-label password">Password</span>
                  </div>
        <Link to='/profile'>
                    <button type="submit">Login</button>
                </Link>
              </form>
              <Link to='/forgotten_password'>Forgot your password?</Link>
          </div>
      </Formik>
    )}
  </Auth_context.Consumer>
))

class UserLogin_page extends React.Component {
  render() {
    return (
      <div>
        <UserLogin_form/>
      </div>
    )
  }
}

export default withSiteData(UserLogin_page)

I've tried etags and exuberant-ctags, the former not understanding JavaScript and the latter giving me the following empty entry for this file:

user_webapp/src/auth/login.js,0
^L

I'd like meta-. to work for HTML defined objects and regular JavaScript.

I saw mention of helm and ivy, but those appear to be for completion and not generation of tags tables.

How can I generate TAGS tables for my reactive JavaScript code that detects all the definitions?

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.