Showing posts with label redux. Show all posts
Showing posts with label redux. Show all posts

Wednesday, May 2, 2018

An introduction to functional Reactive programming in Redux

An introduction to functional Reactive programming in Redux

ReactiveX or Rx is the most popular API for reactive programming. It’s built on the ideologies of the Observable Pattern, Iterator Pattern, and Functional Programming. Rx has libraries for different languages, but we will be using RxJS. An Observer essentially subscribes to an Observable.

Thursday, February 22, 2018

Why do we need middleware for async flow in Redux?



According to the docs, "Without middleware, Redux store only supports synchronous data flow". I don't understand why this is the case. Why can't the container component call the async API, and then dispatch the actions? For example, imagine a simple UI: a field and a button.

Sunday, January 14, 2018

Redux & Flow-type — getting the maximum benefit from the fewest key strokes



Being a frequent Typescript user I’m fully onboard with the benefits of Type systems. Especially in the arena of UI development with React & React-Native, I don’t think I could ever imagine going back to a time where your props & state updates are not verified by the compiler as you type…

Sunday, December 31, 2017

Redux Testing Step by Step: A Simple Methodology for Testing Business Logic



Part two of our Redux workflow series. A well-implemented system is only half the work. The other half is an automated suite of tests proving our system is behaving according to spec. This is a crucial factor in increasing our engineering velocity.

Unit testing with Jest: Redux + async actions + fetch



LAST UPDATE: June 24, 2017. Original writing: May 19, 2016. I have been using Jest since its beginnings. I won’t lie, the path has been painful: Things like updating from version 0.x.0 to version 0.y.0 (specially to version 0.4.0) was particularly terrible for my tests.

Real integration tests with React, Redux and Router



After being bitten a couple of times by bad refactoring and a broken app — even with all my tests green — I started to research about integration tests in React. Possibly also with Redux and React Router. To my absolute shock, I couldn’t find any good material out there.

Thursday, December 28, 2017

Time Series Charts with React, Redux and D3



By Richard Powell, Frontend Engineer at Server Density. Published on the 29th March, 2017. For 2 years Server Density used Backbone and Rickshaw to render server and website monitoring data into time-series charts.

Thursday, December 21, 2017

Test redux actions that calls an API



export function receivingItems() { return (dispatch, getState) => { axios.get('/api/items') .then(function(response) { dispatch(receivedItems(response.data)); }); }; } describe('Items Action Creator', () => { it('should create a receiving items function', () => { expect(receivingItems()).to.be.a.

Friday, July 14, 2017

Testing a React-Redux app using Jest and Enzyme



As we enter into the new year(2017), I wanted to pause from writing posts on stuffs that excite me like developing something new like some React app or learning and trying out some super awesome library like GraphQL etc and just go few steps back and focus on unit testing and TDD.

Friday, June 23, 2017

Getting started with Redux and GraphQL



When GraphQL was announced it was clear to everyone that it was going to be awesome. The community waited patiently to sink their teeth into it and finally the technical preview was released in all its glory.

Thursday, June 22, 2017

JWT Authentication with React + Redux



As part of my ongoing attempts to can has React + Redux, I spent some time yesterday building authentication flow into my CatBook React/Redux app, using JWT.

Tuesday, June 20, 2017

Secure Your React and Redux App with JWT Authentication



TL;DR: Redux is a state container for JavaScript applications by Dan Abramov that lets us have a predictable unidirectional data flow. It offers some benefits over other libraries like Flux, but works in similar ways. In this article we explore how to add JWT authentication to a Redux app.

Sunday, June 4, 2017

Redux and RethinkDB



In this blog post I try to see if using a modern database can be a good companion to Redux pattern. In particular I find that a database allows atomic data updates nicely by design.

Friday, June 2, 2017

React, Flux, localForage and Saving Data



Remember my vague promise to write an awesome app? The one where I would do something more than just a basic task list like todomvc? Well, I’m progressing. Right now, my HoneyDo application has the ability to edit tasks through a bunch of React components and it loads and saves data from the disk.

Thursday, May 11, 2017

json-api-normalizer: легкий способ подружить Redux и JSON API



В последнее время набирает популярность стандарт JSON API для разработки веб-сервисов.

Monday, May 8, 2017

Connecting Redux to your API



I started using Redux last summer and one of the first things I needed to do was connect it to a backend. The awesome Redux docs have an example of how to do this, but since they were written, alternative approaches have emerged and matured.

Handling API calls in Redux with Redux API middleware



It is very likely that, at a given point during the development of a client-side web app, it will be necessary to communicate with the server side using a RESTful API.

Using Redux-api-middleware With Rails



At work, we’ve been building front-end applications with React and Redux. Our back ends are generally written in Rails. In order to make the API calls to the back end, we’ve been using the redux-api-middleware library which works quite well for us.

Thursday, May 4, 2017

react-navigation with complete redux state management, tab-bar, and multiple navigators



Step Two: Install dependencies. I will use react-native-vector-icons for the icons on the tab-bar and pull in react-navigation from the source. Step Three: Write the code.

Wednesday, April 26, 2017

Managing Side Effects In React + Redux Using Sagas



Redux is a Flux-like framework that has exploded in popularity within the React community. It reduces complexity by enforcing a unidirectional data flow, the use of single state atom, and pure reduce functions for state updates.

bundlephobia

JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...