GithubHelp home page GithubHelp logo

fdlk / data-explorer-data Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 223 KB

Explore state management with vue router as the source of truth for part of the state

JavaScript 39.17% HTML 2.43% Vue 26.94% TypeScript 31.46%
vue vuex vue-router vue-router-sync

data-explorer-data's Introduction

data-explorer-data

This repo takes a look at Vue state management where part of the state is stored in the URL so it can be shared as a link.

Event flow

The vue router is source of truth for the state stored in the URL:

  • menu selection
  • entity type ID
  • page number
  • page size
  • sort order

The vuex store contains application state:

  • error message toasts

And functions as server cache plus loading state for

  • metadata
  • data

vue-router-sync is used to add a route module to the vuex store. Typed vuex getters interpret the route parameters and provide sensible defaults

The data explorer view watches the getters to trigger fetching of data and metadata.

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Run your unit tests

yarn test:unit

Run your end-to-end tests

yarn test:e2e

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

data-explorer-data's People

Contributors

fdlk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.