This file contains hidden or 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'; | |
const Name = ({ data: { bio, avatar, handleClick } }) => { | |
return ( | |
<div> | |
<button onClick={handleClick}>Click Me</button> | |
<h4>About: {bio}</h4> | |
<img src={avatar} alt="avatar"/> | |
</div> | |
); |
This file contains hidden or 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 request from 'axios'; | |
import Name from './Name.jsx'; | |
class WorkShop extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
user: {}, |
This file contains hidden or 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 the library | |
import RavePaymentModal from 'react-ravepayment' | |
class App extends Component { | |
state = { | |
key: "FLWPUBK-XXXXXXXXXXXXXXXXXXXXXXXXXX-X", // RavePay PUBLIC KEY | |
email: "[email protected]", // customer email | |
amount: "1000" // equals NGN 1000. Minimum amount allow of NGN500, |
This file contains hidden or 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 documents = [ | |
{ | |
id: 1, | |
title: 'document 1', | |
content: 'The first document' | |
}, | |
{ | |
id: 2, | |
title: 'document 2', | |
content: 'The second document' |
This file contains hidden or 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 express = require('express'); | |
const bodyParser = require('body-parser'); | |
// handle graphql request and response based on schema | |
const { graphqlExpress } = require('apollo-server-express'); | |
const schema = require('./schema'); | |
let app = express(); | |
This file contains hidden or 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 { makeExecutableSchema } = require('graphql-tools'); | |
const typeDefinitions = ` | |
type Document { | |
id: ID! | |
title: String! | |
content: String! | |
} | |
type User { |
NewerOlder