Skip to content

Instantly share code, notes, and snippets.

View prakashsvmx's full-sized avatar

Prakash Senthil Vel prakashsvmx

View GitHub Profile
@prakashsvmx
prakashsvmx / upload-minio.html
Created December 18, 2020 03:57 — forked from harshavardhana/upload-minio.html
Upload to play.minio.io:9000 from browser using minio-js
<!DOCTYPE html>
<html>
<head>
<title>Minio SDK for JavaScript - Sample Application</title>
@prakashsvmx
prakashsvmx / suspense-boundaries.js
Created August 27, 2019 09:48 — forked from julianburr/suspense-boundaries.js
Why Suspense Will Be a Game Changer - Suspense Boundaries
class App extends Component {
render () {
return (
<Suspense fallback={<p>Loading...</p>}>
<DeepNesting>
<ThereMightBeSeveralAsyncComponentsHere />
</DeepNesting>
</Suspense>
);
}
@prakashsvmx
prakashsvmx / context.js
Created August 27, 2019 09:45 — forked from julianburr/context.js
Why Suspense Will Be a Game Changer - Context
const DataContext = React.createContext();
class DataContextProvider extends Component {
// We want to be able to store multiple sources in the provider,
// so we store an object with unique keys for each data set +
// loading state
state = {
data: {},
fetch: this.fetch.bind(this)
};
@prakashsvmx
prakashsvmx / ajaxWithReduxSaga.js
Created September 30, 2018 15:36 — forked from rowlandekemezie/ajaxWithReduxSaga.js
A basic implementation of AJAX with redux-saga
const { applyMiddleware, createStore } = Redux;
const createSagaMiddleware = ReduxSaga.default;
const { put, call } = ReduxSaga.effects;
const { takeLatest } = ReduxSaga;
const { connect, Provider } = ReactRedux;
// GitHub API
const gitHubApi = (username) => {
return fetch(`https://api.github.com/users/${username}`)
.then(response => {
@prakashsvmx
prakashsvmx / RFReactSelect.js
Created September 11, 2018 15:59 — forked from leocristofani/RFReactSelect.js
How to integrate React Select with Redux Form
import React, { PropTypes } from 'react';
import Select from 'react-select';
import 'react-select/dist/react-select.css';
RFReactSelect.defaultProps = {
multi: false,
className: ""
};
RFReactSelect.propTypes = {