0.3.13 • Published 9 years ago
restack-core v0.3.13
restack-core
tools make react application development easier.
modal
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
| dependency | type | desc |
|---|---|---|
| babel-runtime | babel | |
| jed | lib | jed i18n |
| lodash | lib | underscore like |
| moment | lib | time |
| react | lib |
| dependency | type | desc |
|---|---|---|
| babel-plugin-transform-async-to-generator | babel-plugin | Stage 3 |
| babel-plugin-transform-class-properties | babel-plugin | Stage 1 |
| babel-plugin-transform-export-extensions | babel-plugin | Stage 1 |
| babel-plugin-transform-object-rest-spread | babel-plugin | Stage 2 |
| babel-plugin-transform-runtime | babel-plugin | babel helpers in one place |
| babel-preset-es2015 | babel-plugin | |
| babel-preset-react | babel-plugin | |
| babel-preset-react-hmre | babel-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