JSX for...in loop

React JSX
Given this object: lst socials = { foo: 'http://foo' } I want to loop through it in JSX. This works: let socialLinks = [] let socialBar for (let...
3 months ago

Conditional logic jsx react

React JSX
I am trying to apply more than 1 condition to className in my jsx view. However it won't let me. It only listens to the first condition. className...
3 months ago

Electron with JSX

React JSX
I am writing desktop app with Electron from Github, and I am using React with it. One thing I notice is that because Electron uses io.js, I no longer ...
2 months ago

Client-side JSX transpiling

React JSX
I want to create React applications with JSX and not have to use a terminal or any server-side/dev environment commands. The environment we are using ...
20 days ago

React JSX compiling

Javascript
I'm trying to add the class name "active" to links when they are clicked. I can't get this JSX to compile. <li onClick={this.showDeals}>&...
11 months ago

React, Unterminated JSX contents

Javascript
I am trying to set up a basic react example - using jspm/systemjs and babel. I have this code here to show a simple page and am getting an error im...
11 months ago

loop inside React JSX

Javascript
I'm trying to do something like the following in React jsx (where ObjectRow is a separate component) <tbody> for (var i=0; i < numrows; ...
9 months ago

React w/ JSX: Load class defined in JSX into HTML

React JSX
I am new to React and have attempted going through a few tutorials but do not have luck so I resort to asking question here. My setup: I have a .jsx ...
5 months ago

JSX- How can I manipulate strings in JSX?

React JSX
I have a string in a JSX file that I have to manipulate this way: Let's suppose I have the following string with this value medical_specialty = "Plas...
4 months ago

JSX Inline function (programatically set?)

React JSX
I want to check for a true value on a state and set a class accordingly. The code below does just this, However... Is there a way to do this programa...
3 months ago

ESLint React PropTypes with JSX

React JSX
I'm using the Airbnb javascript standards to lint my react app and i'm getting an error i'm not sure how to fix. I'm passing in another component in o...
2 months ago

Trouble understanding JSX spread operator

React JSX
Given this example code from the React docs: var props = {}; props.foo = x; props.bar = y; var component = <Component {...props} />; I did so...
1 month ago

JSX dynamic tag with properties

React JSX
I have a systemStatus folder of components. They are exposed with an index.js file like this: export UserCount from './UserCount' I have a JSX comp...
8 days ago

Dynamic JSX element/tag names

React JSX
I'm just wanted to know if there is a best practice approach to rendering an element with ReactJS dynamically Consider these scenarios: (1) Paramete...
16 hours ago

Passing JSX to components vs dangerouslySetInnerHTML

React JSX
I've been working through react examples, and I've been hacking away building some components. Now I think I maybe running into a fundamental "Brain...
5 months ago

JSX with Html Tag in React

React JSX
Is there a way to incorporate react and an href tag? The id: {this.state.id} The html tags: href="#demo1" id="demo1" Is there a way I can add t...
4 months ago

React JSX <option> tag population

React JSX
I am trying to populate an options tag with string values from an array with the following function: render: function(){ var array = ['yes','no']; ...
5 months ago

Webpack - Babel - Parsing JSX: SyntaxError: Unexpected token

React JSX
I am trying to create a React application using webpack. I am using babel to transpile .jsx files. But it seems, it is not using babel loader to load ...
5 months ago

Understand es6 and jsx in react

React JSX
I am going through the official redux tutorial. http://redux.js.org/docs/basics/UsageWithReact.html In the file components/Link.js have the followi...
4 months ago

Have both JSX and normal className together

React JSX
I have a css style class that needs to be in JSX form as it depends on the state, but I also need to use style class the ordinary way for styling. How...
4 months ago