Questions tagged [reactjs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
262 views

Single page React on Rails app vs Multi page React on Rails app [closed]

I've been looking around hoping to get some perspective of the pros and cons of using a Single Page React App vs. a Multi Page React App. The end product of the project is a page with 5 tabs, each ...
0
votes
1answer
156 views

In the react docs why is binding of *this* preferred over arrow functions for event handlers?

In the React docs, the constructor functions of class components contain lines where this is explicitly bound for event handlers e.g. in the docs for handling events class Toggle extends React....
0
votes
1answer
71 views

Thinking about a setup to work with react and front end development

On my team I'm working as a frontend developer in a React codebase. We're building an application and do everything in React. Before this I was actually always a backend developer. Now I have the ...
1
vote
2answers
978 views

What other approaches are there to break circular dependency in MVC?

I'm attempting to build a web front-end based on the MVC pattern, as opposed to based on the libraries involved (e.g. React.js). I'm using constructor-based dependency injection and interfaces to de-...
0
votes
1answer
205 views

Redux: When Should I Keep Track of State and When Should I Not?

NOTE: I am new with the whole concept of state management. I never got into the older languages that "explicitly used" states. I dived into React and Redux for the past week, and as I'm getting into ...
1
vote
1answer
693 views

How do you update a client state with a server state in Vue or other reactive frameworks

You have a server that sends the client data. A JSON object. {"name": "folder1", size: "2406"} The client updates it's data: data = newData And the client is updated. Reactive frontend coding as ...
3
votes
0answers
406 views

Fetch data in parent vs fetching data in child

I know that I want to develop a React App like so: <PhotoPage> <FeedFilter/> <PhotoFeed/> </PhotoPage> Without using Redux, I know that I need to fetch a dataset of ...
1
vote
1answer
518 views

What's the system architecture of a non-SPA reactive application?

I'm starting to learn about reactive web applications, and I pretty much get the hang of the whole components, virtual DOM, states and more. First of all, I usually don't name a technology, but for ...
76
votes
4answers
21k views

Why do many software developers violate the open/closed principle?

Why do many software developers violate the open/closed principle by modifying many things like renaming functions which will break the application after upgrading? This question jumps to my head ...
1
vote
2answers
547 views

Does making a react flash message globally accessible break any conventions?

I read this article where it describes making a flash message in a react app: https://medium.com/@veelenga/displaying-rails-flash-messages-with-react-5f82982f241c They mention adding a reference in ...
3
votes
1answer
699 views

Is undo and redo possible/feasible with two-way data binding (vs uni-directional data flow)?

I'm developing an experimental application for work that requires fully persistent undos and redos. I decided to use react/redux/immutable JS tech stack to solve this problem because I saw it worked ...
3
votes
0answers
347 views

React DOM manipulation vs CSS for responsive breakpoints?

Specifically for ReactJS and responsive frameworks that show/hide elements based on width like Bootstrap. Because ReactJS has a virtual DOM I am presuming doing the DOM manipulation is faster and in ...
0
votes
1answer
208 views

Does Angular2 or Angular4 offer an app state and middleware promise like React / Redux?

I used Angular 1 and React / Redux, and one thing I like about React / Redux is that there is a definite app state, and a middleware that can convert a promise into real data. In Angular 1, we often ...
2
votes
1answer
490 views

Is it true that for both React or Angular, they are also both “convention over configuration”?

In the Ruby on Rails communication, it is often said that RoR is "convention over configuration". Can you say for React / Redux / Flux and AngularJS, Angular2, they are also "convention over ...
2
votes
1answer
191 views

Does AngularJS or Angular 2 provide something similar to the Redux middleware so that AJAX data appear immediately available?

I am learning React / Redux, and one feature I like is, when you fire off an Action, you actually provide a request as the "result" or what is called the payload in Redux, and the Redux middleware won'...
1
vote
2answers
551 views

is a react container component an instance of the adapter pattern?

I'm referring to the two types of react components - presentation component and container component. In a more platform-agnostic description, is the container component just an adapter for a ...
2
votes
1answer
734 views

Animations and React — is it bad practice to mix them?

I have been in arguments with programmers that mixing elements with animations and react is very bad practice, and that all animations should be in a style sheet because that is something ...
1
vote
1answer
441 views

Is using both Selenium and Mocha redundant?

I am learning React+Redux now and came to the testing section. Many people use Mocha or Jest to test React components, so far so good, makes sense. I previously have experience using Selenium and I ...
3
votes
0answers
1k views

How to passing variables from php to react.js component?

For example, I have a react.js component named Question which need the props title,id,content. <div id="main-section"> <div id="question"></div> </div> ReactDOM.render( ...
0
votes
1answer
687 views

Is it necessary to use inline JavaScript with React? Would React therefore get blocked by default by Content Security Policies (CSPs)?

According to https://www.quora.com/What-are-the-key-difference-between-ReactNative-and-NativeScript/answer/Valentin-Stoychev , "ReactNative as using the notation found in React for inlining the UI ...
1
vote
3answers
150 views

Is it common/appropriate to have a Flux application that combines Actions and Dispatchers?

I just picked up a React/Flux app and I'm new to the technology stack. One of the things that's throwing me off is that just about every tutorial I view on this stack very clearly defines Dispatchers ...
3
votes
2answers
324 views

How can I improve the relationship between the designer and developers? [closed]

My team is faced with a big challenge. We are building a greenfield app against a legacy codebase. The legacy code contains .NET controls with a certain look and feel. Our front end is ReactJS. We ...
8
votes
3answers
9k views

camelCase, PascalCase, or underscore if you start from scratch with reactjs?

Title says it all. Can't seem to find what is most common out in the world. I'm brand new to programming. If the answer is "it depends", I would love to know what it depends on. Here to learn.
3
votes
1answer
154 views

Would a site like stack overflow be better as separate static builds or a single app with run-time switches for each community?

I'm designing a web application. I'd like to use sub-domains to split the site into logic separate sections based on some category - exactly like the stack exchange websites do. I'm currently aware of ...
2
votes
1answer
133 views

Separating components by “type”?

We have just started to work with React and some of my team mates proposed to split the components in 3 types (each one in its specific folder): components: reusable components like buttons, inputs ...
-1
votes
2answers
315 views

React.js + Flux, immediate response during history back/forward

In Instagram (web), when you click back/forward arrows - I've noticed that the content isn't loaded from the server and it immediately show up. After reading the docs on react.js + flux, I had this ...
1
vote
1answer
393 views

(react.js) when is it appropriate to call stores from non-container components

I believe most people are in agreement that using container components is a good practice - described in this popular post: https://medium.com/@learnreact/container-components-c0e67432e005#.qhw8yfodx ...
2
votes
1answer
534 views

Should all the rendered data be stored in redux store?

Assume your app doesn't need to work offline. Also assume that you want to render some fresh data from server -> Redux store for that data is invalidated every time it's rendered. Does it make sense ...
1
vote
1answer
214 views

What is the approach for implementing FLUX in a CRUD application that pulls JSON data from the server?

While using FLUX in a CRUD application, according to what I understood, initially the data is returned from an AJAX call and then stored in the STORE. So, all the data that is currently viewed is only ...
3
votes
2answers
2k views

Simple React application design

I have a very simple app that lets you log in and then displays a dashboard. The design process with React and Redux is very simple : I have two React components : Login and Dashboard I store a ...
23
votes
1answer
9k views

Redux memory consumption [closed]

The Redux framework favors immutable state/pure function paradigm, which promotes creation of new state from the previous state in terms of the current action. The applicability of this paradigm is ...
0
votes
1answer
545 views

If AngularJS already takes care of the MVC, would using ReactJS be needed if it is just the View part?

I heard that AngularJS is becoming quite popular, and at the same time ReactJS is also. But if AngularJS already takes care of MVC with 2 way binding between model and view, would ReactJS actually be ...
1
vote
2answers
893 views

Why are the smart folks who write and adopt react.js okay with the way markup is tightly-coupled/buried inside Javascript?

Quite a while ago there was a concerted trend in the industry to move towards adopting templating to separate markup from logic, or something like that. The result was much more pleasing to the eye ...
22
votes
4answers
9k views

Why is JSX good, when JSP scriptlets are bad?

React.js provides JSX as an XHTML-like syntax for constructing a tree of components and elements. JSX compiles to Javascript, and instead of providing loops or conditionals in JSX proper, you use ...
8
votes
1answer
1k views

How will React 0.14's Stateless Components offer performance improvements without shouldComponentUpdate?

This question has been going round and round in my head since I read the release notes (and other related hype) around React 0.14 - I'm a big fan of React and I think that stateless components (https:/...
1
vote
0answers
321 views

Implement FSM explicitly in re-frame/reagent/react?

I'm in the process of making a simple game using re-frame (and thus react and reagent), but I'm stuck at one point. In https://github.com/Day8/re-frame#control-via-fsm they claim Not every app ...
2
votes
2answers
82 views

Isormophic javascript, request processing

I was wondering why isomorphic JS, like using reactjs in both client and server side increase first page load ? What is different from simple SPA applications ? In both cases we are loading the full ...
12
votes
3answers
5k views

Understanding Flux pattern

I'm actually studying the flux pattern and there's something that I can't understand concerning the stores. What are they exactly? I have read many articles, and it seems that it concerns the ...
3
votes
0answers
287 views

Hot swapping files and metaprogramming with front-end JavaScript

I was inspired by a video on hotswapping JS files with React + Webpack for the web. I started trying it out with React + Backbone + RequireJS. Seems to work, as long as I stick to the stateless parts ...
47
votes
7answers
6k views

What is the actual value of a consistent code style

I am part of a consultant team implementing a new solution for a customer. I am responsible for the majority of code reviews on the client-side codebase (React and javascript). I have noticed that ...

1
2