Coder Social home page Coder Social logo

ets-reactnative3 / redditgallery Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmlcnl/redditgallery

0.0 0.0 0.0 15.56 MB

Browse Reddit in gallery mode.

JavaScript 57.29% Ruby 1.62% C++ 8.98% Objective-C 3.08% Java 19.89% Objective-C++ 4.70% Makefile 1.97% Starlark 2.47%

redditgallery's Introduction

Preview Image

Reddit Gallery


Browse Reddit in gallery mode

Information

  • Type the username you want and see the posts of the user listed on the top.
  • Go to the detail of the post.
  • Find out how to use redux and redux-saga in this project.
  • The application has been made enjoyable to use with various animations.
  • It was coded with fully functional component.

Features

iOS Gif Android Gif iOS Android
You can search. You can review the details of any post. You can use it on iOS. You can use it on Android.
USEFULL GIT COMMANDS
  • git status = See changes
  • git branch = See branches in your computer (branch you are working on is green)
  • git branch "X" = Create a branch "X" in your computer
  • git checkout -b "X" -> Create and Switch to branch "X"
  • git switch "X" -> Switch to branch "X".
  • git pull origin "Y" -> Brings changes from branch "Y" to the current branch you are working on
  • git add . = Add all changes in code to stage
  • git status = See all changes (stages are green, others are red)
  • git commit -m "Fixing TopHeaderComponent" = Adding a commit message
  • git push origin "X" = Pushing to branch "X"
  • git reset HEAD~1 = Reset your local git commit

Installation

yarn
yarn go
yarn ios
yarn android

Icons Usage

import * as Icons from '@src/constants/Icons'

let RedditIcon = Icons['reddit']

//In your component use:

<RedditIcon width={wp(20)} fill={'red'} />

Redux Usage

....

const dispatch = useDispatch();

const {homeData} = useSelector(state=>state.home);

...

dispatch(getHomeData(model));
  • For Saga, please check the redux folder in the project.
const responseData = yield call(getHomeDataCall, data);

yield put({
      type: GET_HOME_DATA_SUCCESS,
      data: responseData?.data?.children,
});

Responsive Screen Usage

import {hp, wp} from '@src/constants/Dimensions';

const styles = StyleSheet.create({
  container: {
    marginBottom: hp(5), // For height
    marginLeft: wp(5), // For width
  },
});

React Navigation Native Usage


import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

const Stack = createNativeStackNavigator();

const Route = () => {
  return (
    <NavigationContainer
      onReady={() => {
        console.log('onReady');
      }}>
      <Stack.Navigator>
        <Stack.Screen
          options={{headerShown: false, headerTransparent: true}}
          name={SCREENS.HomeScreen}
          component={HomeScreen}
        />
        <Stack.Screen
          options={{headerShown: false, headerTransparent: true}}
          name={SCREENS.DetailScreen}
          component={DetailScreen}
        />
      </Stack.Navigator>
    </NavigationContainer>
  );
};

...

//for navigate screen
navigation.navigate(SCREENS.HomeScreen);

Detox App Tests Usage

yarn add global detox-cli

//for iOS
detox test -c ios

redditgallery's People

Contributors

bardiaalavi-2020 avatar cmlcnl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.