Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

composable-mobx

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

composable-mobx

A package to make dealing with MobX easier

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

CMX - Composable MobX

A library to make MobX easy

          _            _   _        _      _      
        /\ \          /\_\/\_\ _  /_/\    /\ \    
       /  \ \        / / / / //\_\\ \ \   \ \_\   
      / /\ \ \      /\ \/ \ \/ / / \ \ \__/ / /   
     / / /\ \ \    /  \____\__/ /   \ \__ \/_/    
    / / /  \ \_\  / /\/________/     \/_/\__/\    
   / / /    \/_/ / / /\/_// / /       _/\/__\ \   
  / / /         / / /    / / /       / _/_/\ \ \  
 / / /________ / / /    / / /       / / /   \ \ \ 
/ / /_________\\/_/    / / /       / / /    /_/ / 
\/____________/        \/_/        \/_/     \_\/  

Motivation

At Evermind, we partially picked MobX over Redux for building Orulo in order to avoid copious boilerplate. Yet with a large app, boilerplate inevitably occurs. Composable MobX (CMX) aims to reduce some of this boilerplate, and make the process of working with MobX cleaner and easier along the way.

We also hope that this project will encourage some discussion about how to structure MobX projects that are a little larger than the standard TodoMVC.


Caveats, Warnings

  • This package assumes certain things about how you structure your API
    • Post is used to create.
    • Put is used to update.
  • If you don't like these default assumptions, MobX is designed to be as flexible as possible for you to use anyway. Becuase of a relatively simple codebase and a functional composition architecture (as opposed to rigid classes), CMX can be adapted to your needs with little effort. Even if you don't use this codebase specifically, we hope it gives you some new ideas on how to structure your MobX architecture. Have a read of the code!

Usage

  • You know the drill: yarn add composable-mobx to install.
  • This package uses axios for interacting with your API (at least until other options are added). It assumes that you have configured axios elsewhere in your app. Make sure you set the base API and authorization headers like so somewhere in your code:
    axios.defaults.baseURL = 'https://api.example.com';
    axios.defaults.headers.common.Authorization = AUTH_TOKEN;
    

Function Documentation (TODO)


Development

  • To develop locally, use yalc
  • Publish updates to NPM when ready

Keywords

FAQs

Package last updated on 26 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc