Reason: Error suggests I use "type_" instead of "_type" for input element

Created on 28 Feb 2018  路  1Comment  路  Source: reasonml/reason

As a beginner the solution isn't obvious.

<input 
    type="text"
    />

Produces an error:

Error: 34: type is a reserved keyword, it cannot be used as an identifier. Try `type_' instead

When I attempt to correct it with type_:

<input 
    type_="text"
    />

Produces another error.

The correct way to write it is:

<input 
    _type="text"
    />

The error suggested the wrong fix.

Most helpful comment

FWIW it should be:

<input 
  type_="text"
/>

>All comments

FWIW it should be:

<input 
  type_="text"
/>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jberdine picture jberdine  路  3Comments

bobzhang picture bobzhang  路  3Comments

chenglou picture chenglou  路  3Comments

shaneosullivan picture shaneosullivan  路  3Comments

rickyvetter picture rickyvetter  路  4Comments