0.3.13 • Published 7 years ago

restack-core v0.3.13

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.3.12

7 years ago

0.3.11

7 years ago

0.3.10

7 years ago

0.3.9

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago