Skip to main content

Introduction

Oneki.js introduces the concept of services handling a local or global state very easily and following the best practices (immutability, action, reducers, ...).

The developer doesn't need to create actions, reducers, selectors, ... everything is created automatically by the service.

TypeDescription
Local serviceA service handling a state local to a component. This service is instantied every time the component is instantied
Global serviceA service handling the global state of the application. This service is a singleton and is shared between all components

Architecture

Service architecture

Oneki.js provides a library to built your own local or global services to handle complex asynchronous flows like:

  • Updating the "loading" variable in the local state to true
  • Performing a AJAX GET requests and store the result in the local state
  • Updating the "loading" variable in the local state to false