React

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

snippet - Append a file to FormData from file input in React ES6
8 Oct, 2019
You can use FormData to send form data using AJAX, including files. This is for you if you have to manually add files, you don't take them from a form, for some reason. This snippet is a react...
snippet - Get filename from file type input in React ES6
2 Oct, 2019
Get file name from file input and save it into state. You might need to use this when you hide your html file input and use button or some other element to trigger the click on the file input.
snippet - Get FormData using ref in React ES6
1 Oct, 2019
Get form data using ref attribute on form tag. This could be useful in some cases. The error that I was tackling before I found this solution: "Uncaught TypeError: Failed to construct 'FormData':...
snippet - Simple file field with React Semantic UI
24 Sep, 2019
How to create a simple file field with original Semantic UI for React.
snippet - React, Semantic UI and DataTables.net
27 Aug, 2019
Working example of Semantic UI variation of "DataTables.net" on ES6 variation of React.
snippet - ERROR in Entry module not found: Error: Can't resolve './src' in '/var/www/your-project'
8 Jul, 2019
When you get this error from your webpack project "ERROR in Entry module not found: Error: Can't resolve './src' in '/var/www/your-project'", you have probably used application directory different...
written tutorial - React ES6: Styled Components
6 Oct, 2018
Styled components are the best way to give some visual aid to your components. The heavy lifting should be done by a library, it can be either material design, bootstrap, semantic, etc... To adjust...
snippet - React: Warning: Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`
25 Jul, 2017
Testing React components with Jest I got an error: "Warning: Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`.". I am using Link from react-...
snippet - React: Wait for full render in snapshot testing
5 May, 2017
If you use full render not shallow in your tests, your tests might be rendered before the actual component and its subcomponents are fully loaded. In that case you need to delay the output, while...