https://github.com/foxbunny/react-playground
Experiments with React
https://github.com/foxbunny/react-playground
Last synced: 3 months ago
JSON representation
Experiments with React
- Host: GitHub
- URL: https://github.com/foxbunny/react-playground
- Owner: foxbunny
- Created: 2019-01-29T21:38:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-30T08:30:47.000Z (over 6 years ago)
- Last Synced: 2025-01-26T01:32:49.110Z (4 months ago)
- Language: JavaScript
- Size: 83 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React playground
This is a very simple React app that demos a few interesting concepts:
1. Splitting components between state management and view rendering (see `Greeter.js` vs `greeting-editor.js`).
1. Testing the state updates using `setState` spy (see `Greeter.test.js`, L11).
1. Testing views using `react-testing-library` and snapshots (see `greeting-editor.test.js`).
1. Usage of `prop-types` library to validate props (see `Greeter.js` and `greeting-editor.js`).
1. Avoiding method binding by using anonymous functions (see `Greeter.js`, L16-L17).
1. Using destructuring in an event handler to avoid passing the event object to a method (see `Greeter.js`, L16).