GithubHelp home page GithubHelp logo

notes's People

Contributors

hyunmoahn avatar

Watchers

 avatar

notes's Issues

Method of Debugging on Android

Target MacOS

Needed

  • scrcpy
  • adb
  • brew(installer on MacOS)

Setting

  • Installation
brew install scrcpy
brew cask install android-platform-tools

Useage

  • Connection using wire
// connect mobile device to your macOS
adb devices // check connection
scrcpy
  • Connection using wireless
adb tcpip 5555
adb connect {mobile device IP}
adb devices  // check connection
scrcpy -s {mobile device IP}

occur maximium call when use <redirect> in Switch that has props of location

Description

When using react-router, occur Maximum update depth exceeded error. So, it doesn't render anything.

Wrong Code

const { location } = this.props

<Switch location={location}>
  <Route path="/route/red" component={Red} />
  <Route path="/route/blue" component={Blue} />
  <Route path="/route/green" component={Green} />
  <Redirect to='/route/red' from="/route" /> // <-- this is point
</Switch> 

When I access /route path, Above error is occurred.

Correct Code

const { location } = this.props

<Switch location={location}>
  <Route path="/route/red" component={Red} />
  <Route path="/route/blue" component={Blue} />
  <Route path="/route/green" component={Green} />
  <Redirect to={{...location, pathname: '/route/red'}} from="/route" /> // <-- this is point
</Switch> 

I change type of to props of Redirect from string to object.

Todo

Error is disappear. But I don't know why error is disappear.
Need to find that Why does an infinite rendering occur when the Switch has custom location of props and the Redirect has string of to on props.

Delete referrer

Delete Referrer

  • ex) Delete append current url using line share
const meta = document.createElement('meta')

meta.name = 'referrer'
meta.content = 'no-referrer'
document.getElementsByTagName('head')[0].appendChild(meta)

// share logic

meta.remove()

css transition that doesn't have height element

Description

When you have element that doesn't have height value like height: auto or height: 100% and parent doesn't have height specifically, It doesn't occur transition animation of css using height.

Solution

  1. Set element(doesn't have specific height) max-height overly
  2. Set transition: max-height .2s
  3. Toggle between max-height: 0 and max-height: 700px(example)

** If max-height part of high is very high, should occur delay from max to min. Ref

Ref

https://stackoverflow.com/questions/3508605/how-can-i-transition-height-0-to-height-auto-using-css

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.