0.3.13 • Published 9 years ago

restack-core v0.3.13

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

restack-core

tools make react application development easier.

modal

accroding to the post

i18n

sample bootstrap script app.jsx with i18n

import React from 'react'
import { render } from 'react-dom'
import { App, i18n } from 'restack-core'

i18n.fetchLocaleData({defaultLocale: config.defaultLocale})
.then(({locale, localeData}) => {
  render(
    <App
      routes={routes}
      reducers={......}
      locale={locale}
      localeData={localeData}
      />,

    document.getElementById('react-view')
  );
})
.catch(error => {
  console.error(error);
});

sample bootstrap script app.jsx without i18n

import React from 'react'
import { render } from 'react-dom'
import { App } from 'restack-core'

render(
  <App
    routes={routes}
    reducers={......}
    locale={locale}
    localeData={localeData}
    />,

  document.getElementById('react-view')
);

npm dependencies description

dependencytypedesc
babel-runtimebabel
jedlibjed i18n
lodashlibunderscore like
momentlibtime
reactlib
dependencytypedesc
babel-plugin-transform-async-to-generatorbabel-pluginStage 3
babel-plugin-transform-class-propertiesbabel-pluginStage 1
babel-plugin-transform-export-extensionsbabel-pluginStage 1
babel-plugin-transform-object-rest-spreadbabel-pluginStage 2
babel-plugin-transform-runtimebabel-pluginbabel helpers in one place
babel-preset-es2015babel-plugin
babel-preset-reactbabel-plugin
babel-preset-react-hmrebabel-plugin

babel plugins

we enabled these es features by babel

Async to generator transform

async function foo() {
  await bar();
}

Class properties transform

class MyClass {
  myProp = 42;
  static myStaticProp = 21;

  constructor() {
    console.log(this.myProp); // Prints '42'
    console.log(MyClass.myStaticProp); // Prints '21'
  }
}

Export extensions transform

export * as ns from 'mod';
export v from 'mod';

Object rest spread transform

// Rest properties
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }

// Spread properties
let n = { x, y, ...z };
console.log(n); // { x: 1, y: 2, a: 3, b: 4 }
0.3.13

9 years ago

0.3.12

9 years ago

0.3.11

9 years ago

0.3.10

9 years ago

0.3.9

9 years ago

0.3.8

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago