You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 18, 2020. It is now read-only.
[Drupal 8](https://www.drupal.org/8) module creates a block with recent comments. Displayed dynamically using [React.js](https://facebook.github.io/react/).
4
+
5
+
[ES2015 (ES6)](https://babeljs.io/docs/learn-es2015/) is used via Babel and npm scripts.
6
+
7
+
The goal is to be as simple as possible: minimum dependencies, tools and steps to actually write ES6 code that works. This way, the code can be easily modified and played with for other purposes without too much hassle.
8
+
9
+
## Requirements
10
+
-[node.js](https://nodejs.org/en/download/) for using npm, not for API
11
+
- npm for package management)
12
+
- working [Drupal 8](https://www.drupal.org/project/drupal) project
13
+
- command line obviously
14
+
15
+
## Installation
16
+
1. Go to the /modules folder in your Drupal 8 project (normally /modules from project root)
17
+
2. Clone this repository
18
+
3. Go to /js folder inside the cloned folder
19
+
4. Run `npm install` to download dependencies
20
+
5. Enable the Drupal module by `drush pm-enable drupal_block_reactive` or [via the UI](https://www.drupal.org/documentation/install/modules-themes/modules-8)
21
+
6. Import example Views export configuration from the module. (/config/install, will be automatic later)
22
+
7. Go to the block management page '/admin/structure/block' and find/place the custom module 'Recent comments (reactive)'
23
+
8. Go to the page where you placed the block and you should see 'No comments.' message in a block.
24
+
25
+
Now, play with the reactivity by splitting the window into 2 and posting a comment from one to the other. The expected modern behavior :)
0 commit comments