Skip to content

Instantly share code, notes, and snippets.

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import "RNAppAuthAuthorizationFlowManager.h"
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "AppDelegate.h"
#import <React/RCTBridge.h>
@js08
js08 / gist:a81fa5698eaeff146ae3d11d3988499b
Created July 4, 2020 23:17
react-native-push-ntofications-error
al003110384:sports we3211221$ react-native run-ios
info Found Xcode workspace "sports.xcworkspace"
info Building (using "xcodebuild -workspace sports.xcworkspace -configuration Debug -scheme sports -destination id=E263E184-D665-4992-8DA6-C87661859050")
..................................................................................................................................................................................
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening sports.xcworkspace. Run CLI with --verbose flag for more details.
Prepare build
note: Using legacy build system
=== BUILD TARGET AppAuth OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
import MapView, {
Marker,
AnimatedRegion,
Polyline,
PROVIDER_GOOGLE,
} from "react-native-maps";
import React from 'react';
@js08
js08 / REACT.MD
Created August 19, 2016 00:25
In reducer I am setting state, using that state in my code I need to write a condition

I am new to react. I am using redux and I am writing actions and reducers using that in reducer I am setting state, using that state in my code I need to write a condition. When it’s true I need to display the function renderAutomaticSports or don’t display the function renderAutomaticSports in componentWillMount.

I am dispatching the retrieveSportsDetails function, but I’m not sure how to write the if condition.

The code snippet is below. Can you help me?

import React, {Component} from 'react';
import {moneyFormat} from '../../common/mixin-money-format';
import {connect} from 'react-redux';

import moment from 'moment';

hi,

  • i am trying to fix an error in mocha test case.
  • tried debugging it but not sure why the error is happening.
  • providing the code below
  • anonymous error is pointing to this line shallowRenderer.render();

Error

sportsBasketballChange another place its not setting state properly

Hi,

  • i am new to react.js
  • i am trying to set the value using setState.
  • in sportsSoccerChange function its correctly setting setState.
  • but sportsBasketballChange another place its not setting state properly.
  • can you guys tell me how to fix it.

I have a react js code.

  • I am trying to import other modules into my jsx.
  • for all other modules its working fine.
  • but for this module sports-display-container alone its expecting path which is not the correct way.
  • can you guys tell me how to debug the import statements to make the sports-players to make it work by not mentioning the path name
  • providing the import staments code alone below **- sports-display-container --- is a separate module
  • working: import Display from '../../../sports-display-container';**
  • not-working: import Display from 'sports-display-container';
  • is there a way to debug import staments separately
@js08
js08 / exceeded.md
Last active April 12, 2016 04:27
Uncaught RangeError: Maximum call stack size exceeded ReactElement.js

I am trying to display three components in the browser, but I am getting Uncaught RangeError: Maximum call stack size exceeded. The anonymous function is pointing to the react internal files. It would be great if you guys could let me know how to debug and fix the error. I'm providing the main js file which causes the error

I debugged at this line ReactCompositeComponent_mountComponent @ ReactPerf.js?94d4:66 It's throwing some object... but I'm not sure how to proceed. output: renderedComponent = Object {$$typeof: Symbol(react.element), type: "div", key: null, ref: null, props: Object…}

@js08
js08 / json-difference.md
Last active April 3, 2016 04:37
difference in three lines in my actual json and expected json

hi,

  • i am facing an error in my test case..

  • if i am having mobile platform it should render particular dom structure...

  • so i am passing the return items from jsx inside the expected variable..

  • this expected is checked with testRenderer by using the below line.. expect(testRenderer.getRenderOutput()).to.deep.equal(expected);

  • i am facing an error this is due to difference in json

  • i am seeing difference in three lines in my actual json and expected json do you know why