React is a JavaScript library for building user interfaces. It uses a declarative paradigm that makes it easier to reason about your application and aims to be both efficient and flexible.

learn more… | top users | synonyms (2)

1
vote
0answers
12 views

Managing the state of multiple, similar, selects in React Form

I have a really simple form with 3 select boxes for days, hours, and minutes (in the full code I have a submit button attached to an ajax request). And I've got each of those select boxes attached to ...
-3
votes
0answers
19 views

How can I convert my react-native code to use a listview? [on hold]

So a lot of people online and offline tell me that using a Listview is the most performant and I've never really understood how it works. I have instead used a ...
0
votes
2answers
52 views

ReactJS Static Single Page App with Routing

I'm currently trying to write an App with Cordova and ReactJS. I haven't used ReactJS before, so I'm very confused by the mixed usage of Babel, JavaScript and JSX. I try to use JSX where I can because ...
1
vote
1answer
23 views

Extracting values from refs pointing to form inputs

I have a form component with multiple refs pointing to form inputs. On submit, those inputs' values need to be passed the into form callback, structured as an object. Currently, it's achieved like ...
3
votes
0answers
28 views

Grouping functionality in JavaScript using an Object

I am creating a drawing-app. I want to have a toolbar populated with tools. Each tool is defined in a separate js file. Right now i have defined each tool as an object that contains functions and ...
-3
votes
2answers
76 views
1
vote
1answer
61 views

Simple recipes web app with Redux

I have completed a coding challenge from Free Code Camp. The challenge's user stories are as follows: I can create recipes that have names and ingredients. I can see an index view where the ...
4
votes
2answers
57 views

To-Do List in React

I've written a to-do list app in React, as I am a beginner and this is my first app, I feel it can be improved. Some assistance in improving it, and how or why improvements are better would be much ...
1
vote
1answer
64 views

Very basic isomorphic JavaScript application

I'm trying to update my skillset by learning how to write isomorphic JavaScript applications. For my stack, I've chosen React and Express - no database yet. The problem many people seem to face when ...
2
votes
0answers
25 views

A 'top 100' app that displays list of users ordered in two different ways

I built a small app that gets data from a remote json file and displays it in a list of users. In each list item, an image of the user, their name, and their points tallies are shown. The list is ...
7
votes
1answer
54 views

React & ES6 news app

I have written a small app that fetches news items from an endpoint and displays them in a grid. I used React to create components and use them throughout the app. This is the first thing I have ...
3
votes
1answer
41 views

Implementing the “Thinking in React” example from React documentation without using Refs

I'm quite new to React and was working through the "Thinking in React" example, I noticed they used refs for updating state, but I also read on SO that using refs isn't that good in the long run, so I ...
3
votes
1answer
44 views

To-do list using React

Would this todo list benefit from breaking it down into more components? What would be the advantages? Am I breaking any best practices from what is seen here? ...
2
votes
1answer
122 views

A simple todo list in ReactJS

I have a working useless todo app created with ReactJS. I'm just wondering if my code can be improved. This app can add a todo item and it can display editable list of todo items. This is my ReactJS ...
1
vote
0answers
81 views

ReactJs Tabbed component

I've written a simple tabbed component in ReactJS, whose purpose was to make defining different tabs very simple. My implementation does this very well in my opinion, since defining tabs becomes very ...
3
votes
1answer
92 views

Updating state with React

I am creating a blog using React, MongoDB, Express and Node. I have three components: App, List, and Item. The item is a blog post; the list is a list of the blog posts, and the app includes a place ...
6
votes
1answer
156 views

My first React.js components for a golf app i'm building, how did I do?

So I've recently started to look into react, I feel like I'm understanding it, but I want to make sure I'm doing the best practices before I make too many bad habits. I'm using the ...
2
votes
1answer
71 views

Return React child component based on current state

I am trying to build a multi page form widget with React for a website inspired by this. Since quite some time has passed since I last touched JavaScript, I'm directly adapting to ES6/7 and tried to ...
0
votes
0answers
214 views

File upload form with React(only frontend)

I wrote a simple file upload with drag-and-drop. It uploads an image to server and show preview on the form. ...
0
votes
0answers
315 views

React table with column sorting (asc, desc), input filtering, and row ordering

I created a really modular way of creating a feature-rich table, including filter input text, sortable columns by ascending and descending order, and the ability to order table rows ...
3
votes
0answers
305 views

My First Shopping Cart with React JS

I've just created my first set of related classes in React and would like to get feedback from more experienced React developers. I've used ES and completely vanilla React. The application is a ...
3
votes
0answers
191 views

Generation of a <dl> in React without <div> wrapping elements

In React, the render method must have one and exactly one child (although that child may have many more children). As a result, it becomes difficult to render ...
1
vote
0answers
132 views

Filter children component via input component

I'm trying to break down the individual functionality of a advanced table UI into different react components (right now all table components are really heavy). I came up with this way of exposing ...
2
votes
1answer
90 views

Deep cloning and modifying containers from ReactJS this.state

I am presently working on refactoring ReactJS code away from directly manipulating this.state and towards using this.setState() ...
2
votes
0answers
61 views

Ordering league table with live data

I've created a small project that contains a league table from Premier League updated constantly using local node.js server. Data is fetched from local server. I'm wondering whether my solution is ...
5
votes
1answer
187 views

Socket.io wrapper for an app with ReactJS components

I am upgrading a traditional jQuery based app by converting a few parts of it into ReactJs components and use Socket.io for the data transfer medium. There are a few React components spread across ...
2
votes
0answers
417 views

Passing functions using higher order components in React

After reading this, I'm on board, however it doesn't get into passing methods from the parent class. In my mixins right now I have a lot of helper functions that are used across the various components ...
10
votes
2answers
226 views

Hello, First Name Last Name

I've been working on learning React, and so like most people do when they get started on something new. I created an arbitrary simple project to get a bit more familiar with the concepts. It's so ...
1
vote
0answers
94 views

React.js flood game implementation

We created an implementation of Flood game with React.js(GitHub). We tried to use Flux-architecture. The implementation consists of parts: the storage ...
1
vote
0answers
106 views

Simple ReactJS application

I created a simple react todo-like application (GitHub). There are several questions/problems: How do I separate logic from components (methods such removeHandler etc)? Should the top component have ...
0
votes
0answers
278 views

Typeahead component

Recently I've started looking into ReactJS and I wrote my first component. It's a typeahead component, but since I'm new to ReactJS I am not convinced that my code is correct and if this component can ...
1
vote
1answer
473 views

Set state in life cycle events from props

This is a ReactJS component that accepts a date and displays how long ago this date was (5 seconds ago, 3 minutes ago, 5 hours ago, ...) + it uses a setTimeout to ...
0
votes
0answers
60 views

Controller-view for each page in a mobile site

I have been creating a mobile site using Fluxxor, rendering components server side and after some work setting up the stores and components, I find that each page I have has a corresponding controller ...
2
votes
0answers
116 views

React mixin to declaratively get Bacon.js event steams

I wrote a mixin to declaratively get a Bacon.js event stream. So instead of onChange={this.handleChange}, you can do ...
1
vote
1answer
3k views

React app that receives data via an AJAX requests, display the data and makes it searchable

I have recently started using React and wish to know if my code adheres to the React coding style, whether I am following the same approach towards solving any problem and is there any way I can make ...
4
votes
0answers
367 views

ReactJS app to add and validate items to a list

I wrote a sample app based on the ReactJS tutorial, and I would like some thoughts on how idiomatic this code is. Unfortunately there's no ReactJS integration with Stackoverflow snippets, but I do ...
3
votes
1answer
182 views

React Flux structure for a shopping app

we have just started up a new app and we are using React with the Flux architecture, we have done our best to piece together what we think is the best structure for the app and would appreciate any ...
1
vote
1answer
179 views

Potentially excessive state and use of bind

The purpose of the code is to see if a form element would get data from internal react components and it did. It was also to see how clean I could make an autocomplete component. The autocomplete has ...
2
votes
0answers
62 views

Changing Component Style

I have a component that I want to render with certain styling based upon the props that it will receive. I'm currently defaulting the prop types, and then creating the styling at render as such: ...
1
vote
1answer
676 views

ES6 classes and ReactJS: implementing propTypes

I had a problem to define propTypes for my React class. I ran into solution that doesn't feel right: ...
1
vote
0answers
1k views

Multiple-choice quiz using ReactJS

I'm trying to build a multiple-choice quiz using ReactJS. When the Submit button is clicked, I want to give immediate feedback by changing the text 'input' color (green/red). Right now, it feels like ...
3
votes
0answers
146 views

Create component with select+button

I'm new to ReactJs and trying to figure out the preferred style. I also have tried it enough to realize that I'm not a fan of jsx and prefer how React looks when written in coffeescript. This is a ...
5
votes
1answer
989 views

Live updating headers from form input with React.JS

I am teaching myself React.js from Facebook with small projects. For this one, I want to know if this was the cleanest, most React-ish way I could have done this. The basic structure is as follows: ...