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.
Summary: | Add support for JSX (ReactJS) | ||
---|---|---|---|
Product: | javascript | Reporter: | bfanger |
Component: | Editor | Assignee: | Petr Pisl <ppisl> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | dylanv, geertjan, midnightlightning, novikovd, phejl, simas, srt, terje7601, zimmi |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
bfanger
2015-02-27 20:47:21 UTC
Yeah even if we get autocomplete for JSX later (I personally hate JSX and don't use it, but I have colleagues who do), we should at least be able support the grammar for Lexing the file so that we don't get errors. +1 for React *.jsx support (refactor and syntax-highlighting) in next Netbeans versions. Thank you. I use NB more than 8 years. But now I need JSX. And I must change my IDE to another. +1. jsx files support and syntax highlighting for, in my opinion, the best html editor. *** Bug 250288 has been marked as a duplicate of this bug. *** +1 Please add this support to 8.1 so we can start using it next month. Right now, InteliJ, WebStorm, Sublime, Atom all have support for ReactJS. With React Native released, react become very hot, many developers are learning/using React now. If we don't support this, many of them will go for other IDEs. We love NetBeans, so like to keep using NetBeans. Thanks! (In reply to xianyunjushi from comment #7) > Please add this support to 8.1 so we can start using it next month. Right > now, InteliJ, WebStorm, Sublime, Atom all have support for ReactJS. > With React Native released, react become very hot, many developers are > learning/using React now. If we don't support this, many of them will go for > other IDEs. > > We love NetBeans, so like to keep using NetBeans. > > Thanks! Well said Xian! +1 (In reply to xianyunjushi from comment #7) > Please add this support to 8.1 so we can start using it next month. Right > now, InteliJ, WebStorm, Sublime, Atom all have support for ReactJS. > With React Native released, react become very hot, many developers are > learning/using React now. If we don't support this, many of them will go for > other IDEs. > > We love NetBeans, so like to keep using NetBeans. > > Thanks! YES YES YES xianyunjushi! Dear Sir/Madam, I just learned today, while search for good, free IDE supporting ReactJS/JSX, Microsoft Visual Studio 2015 Community (free) supports ReactJS and JSX now, and they are planing to have better support of ReactJS and JSX in the coming VS 2015 Update 1: https://adtmag.com/blogs/dev-watch/2015/08/react-visual-studio.aspx Please let NetBeans 8.1 support ReactJS and JSX ASAP. Thanks! 8.1 Release candidate is out and it seems to resolve this problem. @SystemicPlural Not true. Not yet resolved, even in RC2. +1 here. I believe it could help Netbeans to prevent users who work with React to change their IDE. I also vote in support for React and .jsx support in NetBeans. Initially, recognition of the file and basic support is enough, but later, if possible, it would be nice to have more advanced features like syntax highlight, error-checks, completion, and all the other good stuff. Please implement the support for JSX. Love NetBeans, but now have to work with React, and need to switch to other IDEs. Please do not make me do it). I switched to NB from Eclipse and Brackets not long ago after finding it has overall better support for Node and JS. But lacking jsx awareness prompted me to switch IDE again, at least for React projects. please add support for jsx, +1 !!!! +1 Another +1 here! almost as important as proper ES6 support. +1 !!! +1 here as well Has there been update to this? This bug was registered last February and there still seems to be no status change despite the growth of React. February LAST YEAR, you mean. +1 +1 Goodbye NetBeans. We had a lot of fun together. Please do not only add a +1 as a comment, please vote for them that it will be higher prioritized. Maybe they should change their voting system to make it a bit clearer. I've been a part of the community off and on for years and never knew that they even had voting. +1 I need ReactJS to come back to NetBeans +1 With 62 votes, it should be priority one enhancement. This is a great feature to have as react and angular are the future of client side web development. I need ReactJS to come back to NetBeans (In reply to anatolse from comment #34) > I need ReactJS to come back to NetBeans What do you mean "come back"? The support was not a part of NB yet :(. Anyway I and Petr Hejl we are hardly working on the basic support, now we have at least on the parser and coloring lexer level something. A few seconds ago Petr merged our branch to the trunk (web-main http://hg.netbeans.org/web-main/rev/0f16e4ffb9b6), so if everything go in the right way, the result can be in daily build tomorrow or the next day. Thank you (both) Petr for your efforts on this. I can't tell you enough how greatly appreciated it is! omg guys you are the best! By "come back", I mean "Use NB again" (which I currently do not use because of lack of ReactJS) As I like the other features but dramatically need ReadtJS, I'm very pleased to hear that you are working on, and hope to use NB again as soon as ReactJS is there. Thanx Great news. Thanks, Petr H. and Petr P. Thanks a lot for working on this! If I understand the commit correctly, the JSX support is added to JsColoringScanner.flex directly. Would it make sense to separate it into a plugin instead of having it in the JavaScript core support? If it becomes an integral part, it might be hard to remove or maintain later, for whatever reason like if JSX is abondoned, or a different version JSX2 comes out or ECMA 7/8 contradicts in some way. (In addition a separate plugin as example would be helpful as a template for people wantint to contribute other template languages like Angular 2...) (In reply to everflux from comment #40) > Thanks a lot for working on this! > > If I understand the commit correctly, the JSX support is added to > JsColoringScanner.flex directly. No not really. The most important change is hidden in libs.nashorn/external/binaries-list. There is bunch of changes in the parser (JSX and ECMA7). > Would it make sense to separate it into a plugin instead of having it in the > JavaScript core support? That would definitely make sense, but unfortunatelly not for 8.2. > If it becomes an integral part, it might be hard to remove or maintain > later, for whatever reason like if JSX is abondoned, or a different version > JSX2 comes out or ECMA 7/8 contradicts in some way. I agree. On the other hand unless the grammar entry point will collide it could stay there anyway. > > (In addition a separate plugin as example would be helpful as a template for > people wantint to contribute other template languages like Angular 2...) Well the above reasons are enough to possibly separate it in the future. However my experience says the "template" approach usually does not work and one have to do lot of different things for different frameworks. I saw that the jsx support is now a part of NB nightly and will come in NB 8.2. Very nice work but only if you have js files and not jsx files, right? Should I map the jsx files to the js mimetype and eveything will be ok? (In reply to ChrisLE from comment #42) > I saw that the jsx support is now a part of NB nightly and will come in NB > 8.2. Very nice work but only if you have js files and not jsx files, right? > Should I map the jsx files to the js mimetype and eveything will be ok? Yes, it should be enough. I added today the registration of javascript mimetype for jsx files and also add new jsx template to the new file wizard in Other catogory. http://hg.netbeans.org/web-main/rev/a632c778b03c Hi, Thanks for JSX integration. So, with the nigthly build, I created a small project and added an Other/JSX File but I get an error "Unexpected token <" just as if the .jsx is not interpreted. Sources: index.html ---------- <!DOCTYPE html> <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href=""> <script src="https://fb.me/react-15.0.1.js"></script> <script src="https://fb.me/react-dom-15.0.1.js"></script> <script src="TestHTML5ApplicationReactjs.jsx" type="text/javascript"></script> </head> <body> <div>TODO write content</div> </body> </html> TestHTML5ApplicationReactjs.jsx (this is the default) ------------------------------- var Hello = Rreact.createClass({ render: function () { return ( <div></div> ); } }); (In reply to pachat from comment #44) > Hi, > > Thanks for JSX integration. > > So, with the nigthly build, I created a small project and added an Other/JSX > File > > but I get an error "Unexpected token <" > just as if the .jsx is not interpreted. > .... Could you please create new issue for it and add information about the build number or attach please your message log? And a screenshot? It's strange it should work. Thanks Basic React support is a part of NetBeans 8.2. At least NB are able to parse react code, provide syntax coloring and offer code completion. (In reply to Petr Pisl from comment #46) > Basic React support is a part of NetBeans 8.2. At least NB are able to parse > react code, provide syntax coloring and offer code completion. Wow, this is awesome! I haven't yet checked it out in 8.2, but just wanted to express my appreciation for your work. Thanks! Please add bugs and feature requests at the new Apache NetBeans JIRA board: https://issues.apache.org/jira/projects/NETBEANS |