Quick and easy React snippets that you're always looking for but never find
React components implement a render() method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by render() via this.props.
Doing a (GET) fetch request on component mount
This is a simple react function component
a button example in React for a specific onClick event handler
Render multiple react components without the need of a DOM elevent wrapper
Returns a stateful value, and a function to update it
useEffect hooks lets perform an action whenever a value changes
A simple form in React using useState hooks
dangerouslySetInnerHTML is React’s replacement for using innerHTML in the browser DOM.