GithubHelp home page GithubHelp logo

music-rec / react-mobx-ssr-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kinotto/react-mobx-ssr-boilerplate

0.0 1.0 0.0 1022 KB

React Mobx SSR isomorphic TODO list starter :maple_leaf:

License: MIT License

JavaScript 85.25% CSS 14.75%

react-mobx-ssr-boilerplate's Introduction

React + Mobx + SSR starter

Description

Minimalistic Isomorphic TODO list application already set up with:

  • React 16 + React Router 4
  • MobX 5.5 (state management library)
  • Server side rendering with NodeJS + Express
  • reactive approach to update component state (using ES2016 decorators e.g. @observable, @observer)
  • Flow (static type checking at compile time)
  • Sass compilation
  • Webpack with a configurations for both dev and prod environments
  • HMR + React HOT reload + Sass hot reload
  • Unit testing with Jest
  • Custom VScode config for debugging

This app doesn't add any unuseful complexity, just a simple TODO list implemented following the best practice with some useful npm tasks to build and run your app

Build and run

yarn install or npm install 
npm run build or npm run build:prod
npm run start or npm run start:prod

Dev and Prod

The starter comes with two webpack configurations for development and production environments. To speed up the dev environment it comes with HMR enabled and already configured with Sass Hot reload and React hot loader.

Flow

The project relies on Flow being installed globally, if you're experiencing any syntax errors just make sure you have flow installed (and if you're using VsCode add even the proper flow extension).

Basic folder structure

  • Stores

    • Domain: stores the data which'll be needed in your app. (user data, for example todos array)
    • View/UI: stores the data which'll be needed to present your app (loading, error variables..) if the state of the store is too simple there's no need of a specific component ui-store.
  • Models: Here you can define the data models

  • Services: Here you can make services like api calls, that will be used directly by the stores

  • Components: Container or Smart Components, Dumb or presentational components

  • Style: any scss must be placed in the style folder and must have the prefix _ if is a partial file

Debug

you can debug both the client and the server, there's already a custom vscode launch.json configuration, so you just need to run the debugger and you should be ready to go

  • Client

  • Server

License

MIT 2018 License Karim Abdelcadir

react-mobx-ssr-boilerplate's People

Contributors

kinotto avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.