On Github carlosvillu-com / arc-frontend-reactjs
Out with the monolith in frontend architecture
In with a fully reusable UI with components
npm install -g @schibstedspain/generator-sui-react
npm install @schibstedspain/frontend-pre-commit-rules
npm install @schibstedspain/theme-basic
npm install @schibstedspain/re-theme-fotocasa
npm install @schibstedspain/real-estate
RealEstate.get('autocompleted_search_use_case') .execute({query 'barcelon'}) .then(locations => { // location is an array of LocationValueObject }) .catch(err => { // err is an instance of Error });
This is isomorphic code!!
npm install @schibstedspain/rosetta
import i18n from '@schibstedspain/rosetta'; import polyglot from '@schibstedspain/rosetta/lib/adapters/polyglot'; i18n.adapter = polyglot; i18n.translations = { 'HELLO_WORLD': 'Hola mundo!' }; i18n.t('HELLO_WORLD') //=> Hola mundo!
import React from 'react'; import {rosetta} from '@schibstedspain/rosetta'; @rosetta //=> This decorator allows us to update all components if there is a change of language class App extends React.Component { render(){} }
npm install @schibstedspain/suntory
import suntory from '@schibstedspain/suntory'; @suntory({ 'mouseover [data-click]': function(e) { console.log(e.target) } }) class List extends React.Component { render() { return (