Skip to content

Instantly share code, notes, and snippets.

View rcherara's full-sized avatar
💭
Never stop coding

Cherara Reddah rcherara

💭
Never stop coding
View GitHub Profile
@rcherara
rcherara / application.yaml
Created March 13, 2021 04:35 — forked from sshepel/application.yaml
SCDF k8s config
server config:
spring:
cloud:
dataflow:
security:
authorization:
provider-role-mappings:
scdf-test:
map-oauth-scopes: true
role-mappings:
title author
Error Handling in React 16
gaearon

As React 16 release is getting closer, we would like to announce a few changes to how React handles JavaScript errors inside components. These changes are included in React 16 beta versions, and will be a part of React 16.

Behavior in React 15 and Earlier

In the past, JavaScript errors inside components used to corrupt React’s internal state and cause it to emit cryptic errors on next renders. These errors were always caused by an earlier error in the application code, but React did not provide a way to handle them gracefully in components, and could not recover from them.

@rcherara
rcherara / minification.md
Created March 6, 2020 04:09 — forked from gaearon/minification.md
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal: