Skip to content

micttyoid/xexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Xexa: React State Utility for Neither

State for whom neither want underscore nor uppercase in convention.

Motivation

Starting a new team project, the decision process of such coding convention can be omitted by not having the problem.

Installation

Do the follow in your react project

For NPM

npm install xexa

For Yarn

yarn add xexa

Example: React Counter

import React, { useState } from 'react'
import { digs } from 'xexa'

const Foo = () => {
    // digs - destructure into get/set
    const count = digs(useState(0))

    return (
        <div>
            <h1>Count: {count.get}</h1>
            <button onClick={() => {
                  count.set(count.get + 1)
            }}>Increment</button>
        </div>
    )
}

Releases

No releases published

Packages

No packages published