@acemarke/redux-starter-kit

  • A simple set of tools to make using Redux easier – – The package is intended to help address three common complaints about Redux: – – We can’t solve every use case, but in the spirit of and , we can try to provide some tools that abstract over the…
  • Takes a single configuration object parameter, with the following options: – – A utility function to create reducers that handle specific action types, similar to the example function in the “Reducing Boilerplate” Redux docs page.
  • Takes an initial state value and an object that maps action types to case reducer functions.
  • Internally, it uses the library, so you can write code in your case reducers that mutates the existing value, and it will correctly generate immutably-updated state values instead.
  • It also accepts an object of customization options for more specific use cases.

A simple set of tools to make using Redux easier
Continue reading “@acemarke/redux-starter-kit”

Easily display PDF files in your #ReactJS application: by @wojtekmaj91 #JavaScript

Easily display PDF files in your #ReactJS application:  by @wojtekmaj91 #JavaScript

  • We strongly recommend to use Node >= 6 and npm >= 5 for faster installation speed and better disk usage.
  • Your project needs to use React 15.5 or later.
  • If you use older version of React, please refer to the table below to find suitable React-PDF version.
  • Add React-PDF to your project by executing .
  • This project wouldn’t be possible without awesome work of Niklas Närhinen niklas@narhinen.net who created its initial version and without Mozilla, author of pdf.js.

react-pdf – Easily display PDF files in your React application.
Continue reading “Easily display PDF files in your #ReactJS application: by @wojtekmaj91 #JavaScript”

React v15.5.0

What do you think about React v15.5.0?



#ReactJS #React15 #JavaScript #Developer #WebDev

  • In 15.5, instead of accessing from the main object, install the package and import them from there:

    The codemod for this change performs this conversion automatically.

  • You may also consider using Flow to statically type check your JavaScript code, including React components.
  • Later, classes were added to the language as part of ES2015, so we added the ability to create React components using JavaScript classes.
  • Along with functional components, JavaScript classes are now the preferred way to create components in React.
  • The codemod for this change attempts to convert a component to a JavaScript class, with a fallback to if necessary.

It’s been exactly one year since the last breaking change to React. Our next major release, React 16, will include some exciting improvements, including a complete rewrite of React’s internals. We take stability seriously, and are committed to bringing those improvements to all of our users with minimal effort.
Continue reading “React v15.5.0”

Redux: Structure your frontend applications

#Redux: Structure your frontend apps  #ReactJS #JavaScript

  • Your application declare actions for each components.
  • We will now write reducers functions that correspond to the actions we previously wrote in order to update the value in our application state.
  • Android atom babel best practice encryption exception Facebook jasmine Javascript mobile mobile app package php protocols react redux security SSL TLS
  • Great, we will now write actions that correspond to these constants in a src / actions / counter .
  • The state changes occur when an action is dispatched by your application.

When you want to develop a frontend application, whatever its rendering framework, you will have to structure things into your project in order to organize the data management with views. This case occurs particularly when you use component rendering frameworks like React or VueJS.
Continue reading “Redux: Structure your frontend applications”

Practical Redux, Part 1: Redux-ORM Basics · Mark’s Dev Blog

  • Overall, I highly recommend the use of Redux-ORM in any Redux app that needs to handle normalized nested/relational data .
  • Once you’ve defined your models, you need to create an instance of the Redux-ORM Schema class, and pass the model classes to its register method.
  • It helps solve a number of use cases that are common to many Redux applications, particularly related to managing normalized relational data in your store.
  • In Part 2, we’ll look at specific concepts you should know when using Redux-ORM, and some of the ways I use it in my own application .
  • The majority of my reducer logic is more generic and not class-specific, so I opted instead to write my own slice reducer for this data and just use Redux-ORM as a tool to help with that.

Over the last year, I’ve become a very big fan of a library called Redux-ORM, by Tommi Kaikkonen. It helps solve a number of use cases that are common to many Redux applications, particularly related to managing normalized relational data in your store. I’ve used it heavily in my own application, and have come up with some useful techniques and approaches for using it. Hopefully you’ll find them useful in your own application as well.
Continue reading “Practical Redux, Part 1: Redux-ORM Basics · Mark’s Dev Blog”

0.36: Headless JS, the Keyboard API, & more

  • Working with the on-screen keyboard is now easier with Keyboard .
  • import { Keyboard } from ‘react-native’ // Hide that keyboard!
  • There are some cases where an animated value needs to invert another animated value for calculation.
  • With version 0.36, combining two animated values via division is now possible.
  • b will then follow a ‘s spring animation and produce the value of 1 / a .

Headless JS is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music. It is only available on Android, for now.
Continue reading “0.36: Headless JS, the Keyboard API, & more”

developit/_delegated-component.md Last active Sep 15, 2016

What would Backbone-style event delegation look like in preact/#reactjs?

/cc @matthewcp

  • export default class DelegatedComponent extends Component {
  • component[h] : h)(e) === false ) return false ;
  • /** Create delegate event handlers for a component that can then be passed as props to its base.
  • export const delegate = events => Child => props => < Delegate { ...
  • import { h , cloneElement , Component } from ‘ preact ‘ ;

What if we wanted to use backbone-style event delegation within the component paradigm afforded by react/preact/etc?
Would that be useful?
Continue reading “developit/_delegated-component.md Last active Sep 15, 2016”

State Streams and React — Medium

  • Each connected component is forced to shallow compare in the shouldComponentUpdate lifecycle method because it doesn’t know if it just received a state update which is relevant or not.
  • The above gives us two action streams that we can use to reduce state with.
  • A state stream is effectively the result of reducing a stream of actions.
  • As mentioned before, the two core building blocks of a module’s state stream is its action stream and its reducer (of said action stream).
  • Accessing State in Action Streams

Read the full article, click here.


@MarkusCtz: “Why RxJS is the Better Tool for Unidirectional Data Flow: @christianalfoni @BenLesh @dan_abramov #reactjs #redux #rx”


Why RxJS is the Better Tool for Unidirectional Data Flow


State Streams and React — Medium