Skip to content

Instantly share code, notes, and snippets.

View pistonsky's full-sized avatar
🎯
Focusing on React Native

pistonsky

🎯
Focusing on React Native
  • Parkly.ru
  • Sterlitamak, Russia
  • Instagram fancyjohn
View GitHub Profile
@pistonsky
pistonsky / response.json
Created August 30, 2021 00:55
/api/customers/reservation/schedule?room_id=145&type=days
{
"error": false,
"data": [
{
"date": "2021-08-30 00:00:00",
"is_free": true
},
{
"date": "2021-08-31 00:00:00",
"is_free": true
@pistonsky
pistonsky / HOW_TO_CODE_REVIEW.md
Last active May 11, 2018 08:22
How to code review

How to code review?

  • Review is a top-priority task. Review code soon as possible. It can help to avoid massive merge of PRs at the end of sprint and won’t waste time of team members, especially if tasks are related to each other.
  • First of all you should check if the changes are related to the task. There shouldn’t be a thing like “let me also add this stuff to this PR by the way”.
  • Initial PR comment should contain the link to corresponding trello card.
  • You should not only check the code, but also check if the modified component is working correctly in the app. You check the code very carefully, every line. When checking the component in the app, you should test all possible use cases.
  • The code should follow established code style and styled with prettier. Also, please follow English language rules and use common sense when naming variables. Do not repeat yourself, but keep it simple.
  • Code review is not for critics, it’s rather a place for common effort to make a better product. That’s why it is
@pistonsky
pistonsky / ErrorNotification.js
Created February 22, 2018 10:59
Sample smart error component which slides from top, shows for a second, and slides back up
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { StatusBar, Text, Animated } from 'react-native';
import { getErrorMessage, getErrorId } from '../reducers/selectors';
const HIDDEN = -20;
const SHOWN = 0;
class ErrorNotification extends Component {