An open API service indexing awesome lists of open source software.

https://github.com/akoidan/vue-tricks


https://github.com/akoidan/vue-tricks

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# vue-tricks
Advantages over reactjs:
- Cleaner code (separetion between logic and view)
- Code is intuitive
- Handling state in react could be really a pain in the ass: https://stackoverflow.com/questions/46185343/react-rerenders-whole-component-when-its-properties-change
- Vue automatically updates input state, no need to overhead code with " {
dispatch(exportModalVisibility(true));
}
}
6) import {exportGradebook, exportSurveyModal} from "../actions";
7) connect(mapStateToProps, {exportSurveyModal})(ExportButton);
8) this.props.exportSurveyModal()
9) reducers:
const exportSurveyModalShown = (state=false, action) => {
switch (action.type) {
case EXPORT_MODAL_VISIBILITY:
return action.data;
default:
return state;
}
};

10) reducers const uiState = combineReducers({setupWizardShown, exportModalShown, switchDashboardEnabled, exportSurveyModalShown});
11) combineReducers ({..., uiState})