PHPackages                             marczhermo/sscounter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. marczhermo/sscounter

ActiveSilverstripe-vendormodule[Admin Panels](/categories/admin)

marczhermo/sscounter
====================

sscounter field

0.0.8(6y ago)157[1 PRs](https://github.com/marczhermo/sscounter/pulls)BSD-3-ClauseJavaScriptPHP &gt;=7.1

Since Jan 30Pushed 2y ago3 watchersCompare

[ Source](https://github.com/marczhermo/sscounter)[ Packagist](https://packagist.org/packages/marczhermo/sscounter)[ RSS](/packages/marczhermo-sscounter/feed)WikiDiscussions 1 Synced today

READMEChangelogDependencies (2)Versions (16)Used By (0)

SilverStripe SSCounter Field Module
===================================

[](#silverstripe-sscounter-field-module)

Overview
--------

[](#overview)

SSCounter is simple sprinkle of React and Redux to a normal implementation of `TextField`. This is an exercise about learning and creating a SilverStripe 4.x module with React and Redux on top of it. Improvements will be based on the Author's progress with the said technologies. Feel free to learn from it but don't use it as a single source of truth. :)

Installation
------------

[](#installation)

```
$ composer require marczhermo/sscounter

```

You'll also need to run `vendor/bin/sake dev/build`.

Concepts
--------

[](#concepts)

1. Like `TextField` which we can create as many as we like. `SSCounterField` will behave similar to it by making small React components which are independent of each other, and will manage its own local state for the value.
2. Implement **Redux** to tap into the Frameworks's global state for storing information of all small components created. Probably tap into "Redux Time Travel".

Todos
-----

[](#todos)

1. Unit testing React components with **Jest**
2. More refactoring from peer review.
3. GraphQL maybe, REST for the meantime.

Documentation
-------------

[](#documentation)

So this is an implementaion of `TextField`, and to illustrate the idea. We will create a simple Data Object called `SampleCounter`

File: `mysite/code/Model/SampleCounter.php`

```
