profile
viewpoint
shrynx shrynx Apollo Agriculture Amsterdam

shrynx/99.re 103

99 problems with reason(able) solutions.

shrynx/react-super-scripts 82

adds super powers to create-react-app and allows custom configs without ejecting.

shrynx/awesome-ppx-reasonml 24

curated list of reasonml PPX rewriter

shrynx/rollup-plugin-bucklescript 22

rollup plugin for using bucklescript

shrynx/reasonz 19

A Haskell fan fiction for ReasonML

shrynx/foodstuff-rx 9

A tiny react app to demonstrate redux-observable

shrynx/nodify 8

zero-config build tool system for Node.js

shrynx/brook 6

[under development] 🏞️ A small stream library for using observables with reasonml.

shrynx/aloudbot 5

a telegram bot to share songs via spotify

shrynx/benri 4

functional utility library for javascript

startedserras/hinc

started time in 3 days

push eventshrynx/awesome-ppx-reasonml

Jaen

commit sha 999698abc0912cbf9562d34f33a987ef29deb90f

Add more repositories Add community GraphQL PPX and a bunch of others.

view details

shrynx

commit sha 1d348de9cf7729f06ffc5937f3b72e2a75cc07e3

Merge pull request #4 from jaens/patch-1 Add more repositories

view details

push time in 7 days

PR merged shrynx/awesome-ppx-reasonml

Add more repositories

Add community GraphQL PPX and a bunch of others.

+5 -1

1 comment

1 changed file

jaens

pr closed time in 7 days

pull request commentshrynx/awesome-ppx-reasonml

Add more repositories

nice, Thanks !

jaens

comment created time in 7 days

Pull request review commentHackYourFuture/class27-react-test

React test Baraa Kolly

-import React from "react";+import React, { useState, useEffect } from "react";+import "./App.css";+import Loader from "react-loader-spinner";+import Button from "./components/Button.js";+import List from "./components/List.js";+import UserInfo from "./components/UserInfo.js";++const URL = "https://randomuser.me/api/?results=5";  function App() {-  return <div>Good luck with the test students!</div>;+  const [users, setUsers] = useState([]);+  const [isLoading, setLoading] = useState(false);+  const [hasError, setError] = useState(false);+  const fetchUser = async () => {+    try {+      setLoading(true);+      const data = await fetch(URL);+      const jsonData = await data.json();+      setLoading(false);+      setUsers(jsonData.results);+    } catch (error) {+      setLoading(false);+      setError(true);+    }+  };

nice

BaraaK

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react test Mohammad SD

+import React, { useState } from "react";+import Spinner from "./isLoader";++const Friend = () => {+  const [friend, setFriend] = useState({});+  const [error, setError] = useState(null);+  const [isLoading, setIsLoading] = useState(false);++  const getFriend = () => {+    fetch("https://randomuser.me/api/?results=5")+      .then((data) => data.json())+      .then((res) => {+        setFriend({+          address: res.results[0].location.city,+          email: res.results[0].email,+          firstName: res.results[0].name.first,+          lastName: res.results[0].name.last,+          country: res.results[0].location.country,+          phone: res.results[0].phone,+        });+        setIsLoading(true);

loading should be false here

mosaadaldeen

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react test Mohammad SD

 import React from "react";+import Friend from "./components/fetchedData";

why is this file called fetchData ? Also since it returning component use CapitalCase

mosaadaldeen

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react test Mohammad SD

 import React from "react";+import Friend from "./components/fetchedData";

why is this file called fetchData ? Also since it returning component use CapitalCase

mosaadaldeen

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react-test-Tahe

+import React, {useState} from 'react';+import Alert from '@material-ui/lab/Alert';+import User from './User';+import SearchButton from './SearchButton';++const LoadUsers = () => {+    const [friend, setFriend] = useState({});+    const [users, setUsers] = useState([]);+    const [isLoading, setLoading] = useState(false);+    const [error, setError] = useState({show:false, text:''});++    const getUsers = () => {+        setLoading(true);+        setError({show:false});+        fetch('https://www.randomuser.me/api?results=5')+        .then(response => {+            return response.json();+        })+        .then(data =>{+            setFriend(data.results[0]);+            setUsers(data.results);+            setLoading(false);+        })+        .catch(err => {+            setError({show:true, text: err.message});+            setLoading(false);+        });

nice !

tahe-ahmed

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react-test-Tahe

+import React from 'react'++const User = ({friend}) => {+    return (+        <div>

same, unnecessary div

tahe-ahmed

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react-test-Tahe

+import React, {useState} from 'react';+import Alert from '@material-ui/lab/Alert';+import User from './User';+import SearchButton from './SearchButton';++const LoadUsers = () => {+    const [friend, setFriend] = useState({});+    const [users, setUsers] = useState([]);+    const [isLoading, setLoading] = useState(false);+    const [error, setError] = useState({show:false, text:''});

you can split it into setError and setErrorMessage, but this is fine too

tahe-ahmed

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react-test-Tahe

+import React from 'react';++const SearchButton = ({getUsers}) => {+    return (+        <div>

no need to wrap in div

tahe-ahmed

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

react-test-Tahe

-import React from "react";+import React from 'react';+import LoadUsers from './Components/UserList';  function App() {-  return <div>Good luck with the test students!</div>;+  return (+    <div>+      <LoadUsers></LoadUsers>

should be <LoadUsers />. Also if you App components is just implementing another component then rather implment in the App component, no need for unnecessary component layer

tahe-ahmed

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

zekiye cakiral react test

+import React, { useState, useEffect } from "react";+import UserCard from "./UserCard";+import Card from "@material-ui/core/Card";+import CardContent from "@material-ui/core/CardContent";+import Typography from "@material-ui/core/Typography";++function FetchedUserData({ userList }) {+  const [user, setUser] = useState("");+  +  useEffect(() => {+    setUser(userList[0]);+  }, []);

could we just write like this ?

const [user, setUser] = useState(userList[0]);
zekiyecakiral

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

zekiye cakiral react test

+import React, { useState } from "react";+import CircularProgress from "@material-ui/core/CircularProgress";+import FetchedUserData from './FetchedUserData'+import UserCard from './UserCard'+import Button from '@material-ui/core/Button';++const END_POINT = "https://randomuser.me/api/?results=5";

zekiyecakiral

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

zekiye cakiral react test

+import React, { useState, useEffect } from "react";+import UserCard from "./UserCard";+import Card from "@material-ui/core/Card";+import CardContent from "@material-ui/core/CardContent";+import Typography from "@material-ui/core/Typography";++function FetchedUserData({ userList }) {+  const [user, setUser] = useState("");+  +  useEffect(() => {+    setUser(userList[0]);+  }, []);++  const selectedUser = (userIndex) => {+    setUser(userList[userIndex.index]);+  };++  return (+    <Card>+      <CardContent>+        <Typography variant="h5" component="h2">+          {userList.map((item, index) => (+            <p onClick={() => selectedUser({ index })} key={index}>+              {" "}+              {item.name.first} {item.name.last}+            </p>+          ))}+          <UserCard user={user} />

user maybe null here and i see you check in UserCard if it is null or not. instead you should always pass a user to UserCard and optionally render {user && <UserCard user={user} />}

zekiyecakiral

comment created time in 8 days

Pull request review commentHackYourFuture/class27-react-test

zekiye cakiral react test

+import React, { useState } from "react";+import CircularProgress from "@material-ui/core/CircularProgress";+import FetchedUserData from './FetchedUserData'+import UserCard from './UserCard'+import Button from '@material-ui/core/Button';++const END_POINT = "https://randomuser.me/api/?results=5";++function NewUser() {+  const [loading, setLoading] = useState(false);+  const [loaded,setLoaded] = useState(false);+  const [hasError, setHasError] = useState(false);+  const [userList, setUserList] = useState([]);++  const fetchUser = async () => {+    setLoading(true);+    setLoaded(false);+    const response = await fetch(END_POINT);+    response+      .json()+      .then((res) => {+        setUserList(res.results);+        setLoading(false);+        setLoaded(true);+      })+      .catch((error) => {+        setHasError(true);

missing setLoading(false) here, so when you will hit error, it will still be in loading state. for not repeating you can also do .finally(() => setLoading(false))

zekiyecakiral

comment created time in 8 days

pull request commentHackYourFuture/class27-react-test

zekiye cakiral react test

very clean code , meaningful variable names and nicely structured. Good Job !

The main thing missing is the app is different from the one asked to be made in the test, but it seems the instructions we not clear. Other than that, i left some comments and improvements.

Also nice that you used Material Design 😀

zekiyecakiral

comment created time in 8 days

startedCirru/calcit-editor

started time in 11 days

startedgsimone/r3f-bubbles

started time in 11 days

push eventshrynx/Golem

shrynx

commit sha 2fc4e904ca0685e0d16302ff49128f9705e2585b

Delete CNAME

view details

push time in 11 days

fork shrynx/Golem

Shem's powerful IDE.

http://xixixao.github.io/Golem

fork in 11 days

startedtakeoutweight/bidirectional

started time in 17 days

startedTyGuS/hoogle_plus

started time in 22 days

startedwilltim/row-polymorphism

started time in 25 days

startedvilterp/datalog-ts

started time in 25 days

startedzshipko/ocaml-rs

started time in a month

startedwillmcgugan/rich

started time in a month

startedFeaturetools/DSx

started time in 2 months

startedales-tsurko/cells

started time in 2 months

startedhamler-lang/hamler

started time in 2 months

push eventshrynx/quil-genart-template

Shriyans

commit sha c3bd4ee668ccca08b62b5613dec1af31cec7495d

updates

view details

Shriyans

commit sha e5fea7c8bef36558f7a2ca8521b9a29423b16188

fix scaling

view details

push time in 2 months

startedzio/zio-sql

started time in 2 months

startedgengeomergence/GenArt

started time in 2 months

startedbloodyowl/reason-recoil

started time in 3 months

issue commenttannerlinsley/react-query

warning for non string query keys

that seems fair, if queryCache.refetchQueries wasn't silently failing and would throw runtime error that would make sense but runtime error maybe aggressive so a warning during development seems good ergonomics

Also useQuery automatically coerces userId to string. i wish the behaviour for keys for both queryCache.refetchQueries and useQuery was similar

shrynx

comment created time in 3 months

issue commenttannerlinsley/react-query

warning for non string query keys

yup i totally can and should but as i mentioned, this more for adding warning when they keys in array is not string as they silently fail during queryCache.refetchQueries but doesn't fail for useQuery

shrynx

comment created time in 3 months

issue openedtannerlinsley/react-query

warning for non string query keys

Hi ! Thanks for the library, was longing for a solution like this for a while.

I got bit by this, had a query key like ['user', userId, 'posts'] but where userId was a number. When using useQuery it worked and the userId was shows as a string in devtools but when trying to refetch using queryCache.refetchQueries it didn't work and silently failed.

although this is clearly mentioned in the documentation, would also be nice if the library warns on non string query key variables. In my case i had forgotten userId is not string.

Another solution would be to have automatically convert to string using JSON.stringify(that's what i end up doing most cases) Also i think queryCache.refetchQueries when provided with query keys that don't exists should also warn

Happy to discuss further and make a PR if needed

created time in 3 months

more