This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269263 - ReactJS, JSX, Ide shows an "error" Unexpected characters found '{'
Summary: ReactJS, JSX, Ide shows an "error" Unexpected characters found '{'
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-07 15:52 UTC by lassve
Modified: 2017-05-12 08:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lassve 2016-12-07 15:52:52 UTC
Product Version = NetBeans IDE 8.2 RC (Build 201609140952)
Operating System = Linux version 3.13.0-37-generic running on amd64
Java; VM; Vendor = 1.8.0_60
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Reproducibility: Happens every time

----------------IN render()
return (
    <div id="search_div" ref="search_div">
      <select id="search_select" ref="search_select" name="search_select" className="center-block" style={styles.select2_size}>
        <option value=""></option>
        {option_ar}
      </select>
      <Popup_Modal show_popup_modal={this.state.show_popup_modal} on_callback_show_popup_modal={this.on_callback_show_popup_modal} />
    </div>
  );
----------------------------------------
ACTUAL:
  Ide shows an "error" Unexpected characters found '{'
(showing a red line at { )
global variable “styles” not declared ...... it's declared, working perfect when running in webbrowser.

 

EXPECTED:
  working perfect when running in webbrowser.
Comment 1 JackPotte 2017-03-01 12:13:41 UTC
Hello, I encounter the same bug with the same software version but with this code (which works perfectly by the way):

class MyForm extends React.Component {
    render() {
        return (
            <div style={{ height: 600 }}>
                 ...
            </div>
        );
    }
}
Comment 2 dnatalini 2017-05-12 08:01:55 UTC
Hello, I'm hit by the same bug, same NB version, on Ubuntu 16.

In my code the error always appears when using style={some_var} inside JSX or DOM components, other keywords other than "style" don't generate errors.