Skip to content

Instantly share code, notes, and snippets.

View bosz's full-sized avatar
💭
Digital Renter and Another Eye

Fongoh M. Tayong bosz

💭
Digital Renter and Another Eye
View GitHub Profile
@bosz
bosz / basic_js.js
Last active March 28, 2022 10:19
Basics of js; variable, operations, loops, arrays
// Variables
var a = 1;
let b = 2;
const c = 3;
const pi = 3.17;
console.log(a, b, c, pi);
// Operations
let sum = a + b;
let sub = a - b;
@bosz
bosz / HandleData.js
Last active October 8, 2022 10:55
Redux toolkit
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { getComments, setSelectedRequest } from '../redux/commentsSlice';
const HandleData = () => {
const dispatch = useDispatch();
const { comments, processing, httpError } = useSelector(state => state.comments);
useEffect(() => {
dispatch(getComments());
}, []);
@bosz
bosz / index.html
Created November 22, 2022 08:46
Basic html, css, js for edna
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
@bosz
bosz / jokes.js
Created February 28, 2023 12:14
Jokes display, get, post
import React, { useEffect, useState } from 'react'
const CommentsCard = ({ comment }) => {
return (
<div>
<blockquote> *** "{comment.comment}"</blockquote>
{/* <button className='btn btn-success btn-sm'>Like</button> */}
</div>
)
import React, {useState, useEffect} from 'react';
import {
View,
Alert,
ScrollView,
TextInput,
TouchableOpacity,
ActivityIndicator,
} from 'react-native';
import auth from '@react-native-firebase/auth';