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 { Spring, animated, config } from 'react-spring' | |
import { TimingAnimation, Easing } from 'react-spring/dist/addons' | |
const myComponent = () => { | |
return( | |
<Spring |
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
// hi there | |
// this is a trick that blowed my mind | |
// => BY THIS => | |
// you can use icon unicode (html unicode like ) that comes from api inside JS | |
// that is gonna be parsed and placed the icon it self instead of printing some jebrish in browser | |
// #01 . here is the function | |
const decodeHtml = (html) => { | |
var txt = document.createElement("textarea"); | |
txt.innerHTML = 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
// #01 creating action file (./src/js/actions/courseActions.js) | |
export function createCourse(course) { | |
return { type: 'CREATE_COURSE' , course } | |
} | |
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
/* .env file is the best place to store all your diffrent api endpoint | |
* this gist is explain hot tyo create one | |
* best of luck | |
*/ | |
// #01 ----------------------------------------------------- | |
// create .env file in your root directory and | |
// add your end points with different names to it like below | |
// in our case we have one endpoint ( this is base url ) |
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 AddDayForm = ({ resort, date , powder, backcountry }) => { | |
let _resort , _date , _powder , _backcountry | |
const handleSubmit = (e) => { | |
e.preventDefault() | |
const formValues = { | |
resort: _resort.value, | |
date: _date.value, | |
powder: _powder.checked, |
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
{ | |
"name": "amdev", | |
"version": "1.0.0", | |
"description": "My Personal Website", | |
"main": "index.js", | |
"scripts": { | |
"dev": "webpack-dev-server -d --progress", | |
"build": "npm run clear && webpack -p", | |
"clear": "rimraf ./dist/*" | |
}, |
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
var SmoothScrolling = { | |
timer: null, | |
stop: function() { | |
clearTimeout(this.timer); | |
}, | |
scrollTo: function(id, callback) { | |
var settings = { | |
duration: 1000, |
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
window.onscroll = () => { | |
let wScroll = window.scrollY; | |
// Movement Parallax | |
document.querySelector('.logo').style.cssText = `transform: translate(0px, ${wScroll/2}%)`; | |
document.querySelector('.back-bird').style.cssText = `transform: translate(0px, ${wScroll/4}%)`; | |
document.querySelector('.fore-bird').style.cssText = `transform: translate(0px, -${wScroll/40}%)`; |
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 ReactDOM from 'react-dom' | |
import AroundIcons from './AroundIcons' | |
class ResumeComponent extends React.Component { | |
constructor(props) { | |
super(); |
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 MyComponent extends Component { | |
constructor(props) { | |
super(); | |
this.state = { | |
_data: { | |
must_known: [], | |
libs: [], | |
tools: [], |