Skip to content

Instantly share code, notes, and snippets.

View naveedahmed986's full-sized avatar

Naveed Ahmed naveedahmed986

View GitHub Profile
@naveedahmed986
naveedahmed986 / child.js
Last active January 14, 2021 11:09
react-parent-child-data-binding
import React from "react";
export default function Child(props) {
return (
<div className="Child">
<h4>Child</h4>
<input
placeholder="input to parent..."
onChange={(e) => props.fromChild(e.target.value)}
/>
@naveedahmed986
naveedahmed986 / parent.js
Created January 14, 2021 10:25
react-parent-child-data-binding
import React from "react";
import Child from "./child";
export default function Parent() {
const [parentInput, setParentInput] = React.useState();
const [childInput, setChildInput] = React.useState();
return (
<div className="Parent">
<h4>Parent</h4>
<input
@naveedahmed986
naveedahmed986 / App.js
Last active December 29, 2020 14:03
react-loading-overlay react-redux app
import React from 'react'
import LoadingOverlay from 'react-loading-overlay'
import './App.css';
import {connect, useDispatch} from 'react-redux'
import {setLoader} from './store';
function App(props) {
console.log(props.isActive)
const dispatch = useDispatch()
return (
<LoadingOverlay
@naveedahmed986
naveedahmed986 / index.js
Created December 29, 2020 13:51
react-loading-overlay react-redux index.js
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { Provider } from 'react-redux';
import {store} from './store';
ReactDOM.render(
<Provider store={store}>
<App />
@naveedahmed986
naveedahmed986 / store.js
Last active December 29, 2020 13:55
react-loading-overlay react-redux store
import {createStore} from 'redux'
// Action Type
const LOADER = 'LOADER'
// Action
export const setLoader = (loading) => {
return {
type : LOADER,
payload : loading
@naveedahmed986
naveedahmed986 / App.js
Created December 29, 2020 12:33
react-loading-overlay hook
import {useState} from 'react'
import LoadingOverlay from 'react-loading-overlay'
import './App.css';
function App() {
const [isActive, setIsActive] = useState(false)
return (
<LoadingOverlay
active={isActive}
spinner
@naveedahmed986
naveedahmed986 / App.js
Created December 29, 2020 12:29
react-loading-overlay import
import LoadingOverlay from 'react-loading-overlay'
import './App.css';
function App() {
return (
<LoadingOverlay
active={true}
spinner
text='Loading...'
>
@naveedahmed986
naveedahmed986 / Program.cs
Last active December 29, 2020 11:21
Dynamics365 Online Connection in C# Console Application
using System;
using Microsoft.Xrm.Tooling.Connector;
namespace Dynamics365_Console_Application
{
class Program
{
static void Main(string[] args)
{
try