syl20lego / rn-skeleton Goto Github PK
View Code? Open in Web Editor NEWReact native project template skeleton, tutorial and example to integrate redux, persistance, saga, navigation and storybook
License: MIT License
React native project template skeleton, tutorial and example to integrate redux, persistance, saga, navigation and storybook
License: MIT License
❯❯❯ ./node_modules/.bin/jest master
PASS test/unit/api/users.api.spec.js
PASS test/unit/components/button.spec.js
PASS test/unit/models/users.mapper.spec.js
PASS test/unit/actions/users.actions.spec.js
PASS test/unit/reducers/users.reducers.spec.js
● Console
console.log test/unit/reducers/users.reducers.spec.js:8
REDUCERS HERE !!!! function reducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:defaultState;var action=arguments[1];switch(action.type){case _type.FETCH_USERS:var _action$data=action.data,page=_action$data.page,seed=_action$data.seed;return _extends({},state,{page:page,seed:seed,loading:true,refreshing:state.seed!==seed});case _type.FETCH_USERS_SUCCESS:var _action$data$list=action.data.list,list=_action$data$list===undefined?[]:_action$data$list;return _extends({},state,{list:state.page===1?list:[].concat(_toConsumableArray(state.list),_toConsumableArray(list)),error:null,loading:false,refreshing:false});case _type.FETCH_USERS_FAILURE:var error=action.error;return _extends({},state,{error:error,loading:false,refreshing:false});default:return state;}}
PASS test/integration/App.spec.js
● Console
console.group node_modules/redux-logger/dist/redux-logger.js:1
%c action %cpersist/PERSIST %c@ 13:41:28.384 color: gray; font-weight: lighter; color: inherit; color: gray; font-weight: lighter;
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c prev state color: #9E9E9E; font-weight: bold { navigator:
{ key: 'StackRouterRoot',
isTransitioning: false,
index: 0,
routes: [ [Object] ] },
users:
{ loading: false,
list: [],
page: 1,
seed: 1,
error: null,
refreshing: false } }
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c action color: #03A9F4; font-weight: bold { type: 'persist/PERSIST',
register: [Function: register],
rehydrate: [Function: rehydrate] }
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c next state color: #4CAF50; font-weight: bold { navigator:
{ key: 'StackRouterRoot',
isTransitioning: false,
index: 0,
routes: [ [Object] ] },
users:
{ loading: false,
list: [],
page: 1,
seed: 1,
error: null,
refreshing: false },
_persist: { version: -1, rehydrated: false } }
console.group node_modules/redux-logger/dist/redux-logger.js:1
%c action %cpersist/PURGE %c@ 13:41:28.842 color: gray; font-weight: lighter; color: inherit; color: gray; font-weight: lighter;
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c prev state color: #9E9E9E; font-weight: bold { navigator:
{ key: 'StackRouterRoot',
isTransitioning: false,
index: 0,
routes: [ [Object] ] },
users:
{ loading: false,
list: [],
page: 1,
seed: 1,
error: null,
refreshing: false },
_persist: { version: -1, rehydrated: false } }
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c action color: #03A9F4; font-weight: bold { type: 'persist/PURGE', result: [Function: result] }
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c next state color: #4CAF50; font-weight: bold { navigator:
{ key: 'StackRouterRoot',
isTransitioning: false,
index: 0,
routes: [ [Object] ] },
users:
{ loading: false,
list: [],
page: 1,
seed: 1,
error: null,
refreshing: false },
_persist: { version: -1, rehydrated: false } }
console.group node_modules/redux-logger/dist/redux-logger.js:1
%c action %cpersist/REHYDRATE %c@ 13:41:28.958 color: gray; font-weight: lighter; color: inherit; color: gray; font-weight: lighter;
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c prev state color: #9E9E9E; font-weight: bold { navigator:
{ key: 'StackRouterRoot',
isTransitioning: false,
index: 0,
routes: [ [Object] ] },
users:
{ loading: false,
list: [],
page: 1,
seed: 1,
error: null,
refreshing: false },
_persist: { version: -1, rehydrated: false } }
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c action color: #03A9F4; font-weight: bold { type: 'persist/REHYDRATE',
payload: undefined,
err: undefined,
key: 'root' }
console.log node_modules/redux-logger/dist/redux-logger.js:1
%c next state color: #4CAF50; font-weight: bold { navigator:
{ key: 'StackRouterRoot',
isTransitioning: false,
index: 0,
routes: [ [Object] ] },
users:
{ loading: false,
list: [],
page: 1,
seed: 1,
error: null,
refreshing: false },
_persist: { version: -1, rehydrated: true } }
console.error node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5206
The above error occurred in the <CardStack> component:
in CardStack (created by Transitioner)
in View (created by Component)
in Component (created by Transitioner)
in Transitioner (created by CardStackTransitioner)
in CardStackTransitioner
in Unknown (created by Navigator)
in Navigator (created by NavigationContainer)
in NavigationContainer (created by AppWithNavigation)
in AppWithNavigation (created by Connect(AppWithNavigation))
in Connect(AppWithNavigation) (created by App)
in PersistGate (created by App)
in Provider (created by App)
in App
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console.error node_modules/fbjs/lib/warning.js:43
Warning: Can't call setState (or forceUpdate) on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in PersistGate (created by App)
in Provider (created by App)
in App
Test Suites: 6 passed, 6 total
Tests: 25 passed, 25 total
Snapshots: 0 total
Time: 11.206s, estimated 31s
Ran all test suites.
I trying to using your skeleton to learning, but why i try to using storybook, my browser can not see any of components in project?
Can you know why? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.