gun-react
This is a React library for Gun which was adapted from https://gun.eco/
Intro
This React library exposes the all Gun functionalities.
Note
For more Information, please check out the Github page here https://github.com/amark/gun
Install
npm install --save gun-react
Sample Usage
; let config = s3: key: '' secret: '' bucket: '' // simple JSON persistence (bundled) // meant for ease of getting started // NOT meant for production file: 'file/path.json' // set your own UUID function { }const App = { constfirstName setFirstName = ; constlastName setLastName = ; constage setAge = ; React const submitValue = { e; const formDetails = 'FirstName': firstName 'LastName': lastName 'Age': age let gunService = props; gunService; gunService; } return <div> <label>Firstname</label> <input id="textinput" name="firstname" onChange= type="text"></input><br/> <label>Lastname</label> <input id="textinput" name="lastname" type="text" onChange= ></input><br/> <label >Age</label> <input id="textinput" name="age" type="number" placeholder="Age" onChange= ></input><br/> <button onClick=submitValue class="btn btn-success">Ok</button> </div> ;}// just bind useGun();//useGun accepts the normal Gun Configuration and a Component to Render and then returns gunService as a Property App config;
Contributing
- Create your feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Some commit message'
- Push to the branch:
git push origin feature-name
- Submit a pull request
How can I thank you?
Why not star the github repo? Share to Others too.
And don't forget to follow me on twitter!