minwe / jetbrains-react Goto Github PK
View Code? Open in Web Editor NEWReact.js live templates for JetBrains editors.
License: MIT License
React.js live templates for JetBrains editors.
License: MIT License
After selecting the jar, WebStorm displays a dialog entitled "Select Components to Import". However, the list is empty. Clicking Okay doesn't seem to import anything -- there's no React group in the Live Templates after restarting WebStorm.
Doesn't seem to work in PyCharm? It imports settings.jar without any warnings or errors, but no new live templates to be found.
Not sure what I can do to troubleshoot...
I think that it would be good to add some snippets for React Native in the future. Someone agree?
Hi,
thx for your live templates. I used them a lot.
But since PHPStorm 2016.2.* its not possible for me to import the Live-Templates.
I tried the import and the manual import.
Do you have an idea? Or is it a known bug?
Downloaded and followed
File -> Import Settings
It doesn't seem to be imported after Restart. I couldn't find anything related to React in Live Templates. I can provide any logs if needed, but couldn't find any errors related to this.
IDE: IntelliJ Idea Ultimate 2017.2
Update
This issue occurred if I have Settings Repository enabled. I had to copy ReactJS.xml
to config/settingsRepository/repository/templates
even though it's still present in config/templates
. Have to file the bug with JetBrains Team.
Suggested solution:
import React, {
PropTypes,
} from 'react';
const $name$ = (props) => {
return (
<div>$END$</div>
);
}
$name$.propTypes = {};
$name$.defaultProps = {};
export default $name$;
It would be nice to have a live template for a component using flow, propTypes, and defaultProps. See this skeleton on Flow's site.
Maybe something like:
// @flow
import React, {Component} from 'react'
type Props = {}
type State = {}
class $COMPONENT$ extends Component {
static propTypes = {}
static defaultProps = {}
props: Props
state: State
constructor(props: Props) {
super(props)
this.props = props
this.state = {}
}
render() {
return (
<div></div>
)
}
}
export default $COMPONENT$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.