Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for React.Fragment #10

Open
alejofernandez opened this issue Aug 16, 2018 · 1 comment
Open

Add support for React.Fragment #10

alejofernandez opened this issue Aug 16, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@alejofernandez
Copy link
Collaborator

alejofernandez commented Aug 16, 2018

Currently they translate to <undefined>:

<undefined>
  <form class=\"ulp-form\" method=\"post\"><input name=\"state\" type=\"hidden\" value=\"T-jbV6hF5ubZ8kk2uZcPVzr50qpAi486\">
    <div class=\"input-container code\">
      <label for=\"code\">code</label>
      <input name=\"code\" type=\"text\" value=\"\" class=\"input\" id=\"code\" placeholder=\"Enter the code you received\" required>
    </div>
    <button class=\"ulp-button ulp-button-default\" type=\"submit\">Continue</button>
  </form>
  <p style=\"margin:5px 0 0 0\">Didn't get the code?</p>
  <form class=\"ulp-action-form\" method=\"POST\">
    <input name=\"state\" type=\"hidden\" value=\"T-jbV6hF5ubZ8kk2uZcPVzr50qpAi486\">
    <input name=\"action\" type=\"hidden\" value=\"resend-code\">
    <input name=\"data\" type=\"hidden\" value=\"\">
    <button class=\"ulp-action-link-button link link-retry\" type=\"submit\">Resend</button>
  </form>
  <p></p>
</undefined>
@ramasilveyra ramasilveyra added the bug Something isn't working label Aug 28, 2018
@ramasilveyra
Copy link
Owner

<></> syntax is supported and this case was fixed with 71a53c7:

import React from 'react';
import PropTypes from 'prop-types';
 const Foo = () => (
  <React.Fragment>
    <h1>Hi!</h1>
    <p>Bye</p>
  </React.Fragment>
);
 export default Foo;

But this case is the only one missing:

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
 const Foo = () => (
  <Fragment>
    <h1>Hi!</h1>
    <p>Bye</p>
  </Fragment>
);
 export default Foo;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants