Skip to content

Commit 96d59cc

Browse files
change repo references to new vue-r organization #9
1 parent 8541485 commit 96d59cc

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Authors@R: c(
1919
Maintainer: Kent Russell <kent.russell@timelyportfolio.com>
2020
Description: Make it easy to use 'vue' in R with helper
2121
dependency functions and examples.
22-
URL: https://github.com/timelyportfolio/vueR
23-
BugReports: https://github.com/timelyportfolio/vueR/issues
22+
URL: https://github.com/vue-r/vueR
23+
BugReports: https://github.com/vue-r/vueR/issues
2424
License: MIT + file LICENSE
2525
LazyData: TRUE
2626
Imports:

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ knitr::opts_chunk$set(
1414

1515
[![Travis-CI Build Status](https://travis-ci.org/timelyportfolio/vuer.svg?branch=master)](https://travis-ci.org/timelyportfolio/vueR)[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/vueR)](https://cran.r-project.org/package=vueR)
1616

17-
[Vue.js](https://vuejs.org) is a quiet, very popular JavaScript framework with an impressive set of features, a solid community, and MIT license. Don't tell anybody, but I think I might even like it better than React. With all this, Vue deserves its own set of helpers for `R`, just like [`d3r`](https://github.com/timelyportfolio/d3r) and [`reactR`](https://github.com/timelyportfolio/reactR).
17+
[Vue.js](https://vuejs.org) is a quiet, very popular JavaScript framework with an impressive set of features, a solid community, and MIT license. Don't tell anybody, but I think I might even like it better than React. With all this, Vue deserves its own set of helpers for `R`, just like [`d3r`](https://github.com/timelyportfolio/d3r) and [`reactR`](https://github.com/react-r/reactR).
1818

1919
`vueR` provides these helpers with its dependency function `html_dependency_vue` and ?htmlwidget?.
2020

@@ -24,7 +24,7 @@ knitr::opts_chunk$set(
2424
`vueR` aims to achieve CRAN status, but for now, it only exists on Github.
2525

2626
```
27-
devtools::install_github("timelyportfolio/vueR")
27+
devtools::install_github("vue-r/vueR")
2828
```
2929

3030
### Example

inst/experiments/experiment_vuex_shiny.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
library(htmltools)
55
library(shiny)
6+
library(vueR)
67

78
vuex <- tags$script(src="https://unpkg.com/vuex@2.5.0/dist/vuex.js")
89

@@ -40,17 +41,18 @@ const store = new Vuex.Store({
4041
4142
const app = new Vue({
4243
el: '#app',
44+
store: store,
4345
computed: {
4446
count () {
45-
return store.state.count
47+
return this.$store.state.count
4648
}
4749
},
4850
methods: {
4951
increment () {
50-
store.commit('increment')
52+
this.$store.commit('increment')
5153
},
5254
decrement () {
53-
store.commit('decrement')
55+
this.$store.commit('decrement')
5456
}
5557
}
5658
})
@@ -59,17 +61,17 @@ $(document).on('shiny:sessioninitialized', function() {
5961
// increment from Shiny custom message
6062
// chose 'increment' but does not have to match the store mutation name
6163
Shiny.addCustomMessageHandler('increment', function(msg) {
62-
store.commit('increment')
64+
app.$store.commit('increment')
6365
});
6466
Shiny.addCustomMessageHandler('decrement', function(msg) {
65-
store.commit('decrement')
67+
app.$store.commit('decrement')
6668
});
6769
})
6870
"
6971
))
7072
)
7173

72-
browsable(ui)
74+
#browsable(ui)
7375

7476
server <- function(input, output, session) {
7577
observeEvent(input$btnIncrement, {

0 commit comments

Comments
 (0)