This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const script = document.createElement("script"); | |
script.src = "https://s3.buysellads.com/ac/bsa.js"; | |
script.async = true; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const first = document.querySelector(".first"); | |
const iframe = document.querySelector("iframe"); | |
const btn = document.querySelector("button"); | |
btn.addEventListener("click", () => { | |
var html = first.textContent; | |
iframe.src = "data:text/html;charset=utf-8," + encodeURI(html); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (modules) { | |
function require(name) { | |
const [fn] = modules[name]; | |
const module = {},exports={}; | |
fn(module, exports,(name)=>require(name)); | |
return exports; | |
} | |
require("./getSum"); | |
})({"./getSum": [ | |
function ( module, exports,require) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import CounterButtons from "./counterbuttons"; | |
import Text from "./text"; | |
import Todo from "./todo"; | |
import FetchData from "./fetch"; | |
import { getState} from "./store"; | |
class App extends Component { | |
render() { | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { getState, dispatch} from './store' | |
class Todo extends React.Component { | |
OnAddHandler = () => { | |
if (this.input.value) | |
dispatch({ | |
type: 'ADD_TODO', | |
text: this.input.value | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const initalState = { | |
num: 0, | |
todos: [], | |
data: "", | |
users:null | |
} | |
function reducer(action, state =initalState ) { | |
switch (action.type) { | |
case "INC": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { reducer } from './reducers'; //import your reducer | |
let state; | |
const getState = () => state; | |
const listeners = []; | |
const dispatch = action => { | |
state = reducer(action, state); | |
listeners.forEach(listener => listener()) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App extends React.Component { | |
render() { | |
return ( | |
<Accordion> | |
<Heading>Heading 1</Heading> | |
<Text> | |
“You've gotta dance like there's nobody watching, Love like you'll | |
never be hurt, Sing like there's nobody listening, And live like it's | |
heaven on earth.” ― William W. Purkey | |
</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { gql, ApolloServer } = require('apollo-server'); | |
const personType = gql` | |
type Person{ | |
name:String! | |
age:Int! | |
} | |
type Query { |
NewerOlder