Skip to content

Instantly share code, notes, and snippets.

View danilowoz's full-sized avatar

Danilo Woznica danilowoz

View GitHub Profile
import React from "react"
import { graphql, Link } from "gatsby"
const BlogPostList = ({ data, pageContext }) => {
const { allMarkdownRemark } = data
return (
<>
{allMarkdownRemark.edges.map(({ node }) => {
const imageSource = node.frontmatter.image.childImageSharp.fluid.src
@danilowoz
danilowoz / React.context.class.App.js
Last active January 14, 2020 13:49
Gist: React.Context<Class | Hooks>
import React from "react";
import Provider, { Consumer } from "./Context";
const App = () => (
<Provider>
<Consumer>
{({ count }) => {
return (
<div>
@danilowoz
danilowoz / react-native-gotchas.md
Last active February 23, 2021 14:22
React Native gotchas

Android gotchas

This document aims to list some "gotchas" in Android development using React Native, or in other words, common problems that a developer might face during the development of Android views and how to solve it.

Shadows

Following the React Native documentation, to set a shadow in an element it needs the following properties: shadowColor, shadowOffset, shadowOpacity and shadowRadius. However, on Android, it needs to use the elevation view style prop from react-native to add shadows, which will also affects the z-index value.

{
  // iOS
 shadowColor: "#000",
mport { Sandpack } from "@codesandbox/sandpack-react";
const App = () => {
const files = {}
return (
<SandpackProvider
files={files}
theme="light"
template="static"