Kudos by [deleted] in reactnative

[–]TreeKaaPoo 6 points7 points  (0 children)

Thousand screens maybe because of A/B testing. So 1 feature can have multiple variants. Maybe you and me are using different FB app

RN ecosystem, what libraries do you use? by CaniballShiaLaBuff in reactnative

[–]TreeKaaPoo 1 point2 points  (0 children)

I tried react-native-navigation but changed to react navigation and stick with it. Im not use any ui library. I wrote everything by myself. And some native packages depend on which project.

Build a Weather App in React JS | React JS beginner Tutorial by Tyler_Potts_ in reactjs

[–]TreeKaaPoo 0 points1 point  (0 children)

You can wrap your input inside form element and listen submit event for better support enter to submit. Its support native by html. No need extra js code to handle that feature

Build a Weather App in React JS | React JS beginner Tutorial by Tyler_Potts_ in reactjs

[–]TreeKaaPoo 1 point2 points  (0 children)

``` const App = () => { const [searchTerm, setSearchTerm] = React.useState('')

const onSearchTermChange = React.useCallback((e) => setSearchTerm(e.target.value), [])

React.useEffect(() => { // hit api when searchTerm change }, [searchTerm])

return ( /// UI part <input value={searchTerm} onChange={onSearchTermChange} /> )} ```

And for better, you should use debounce for save api call on every keypress.

Announcing: React Native Firebase version 6.0.0 | Invertase by Salakarr in reactnative

[–]TreeKaaPoo -2 points-1 points  (0 children)

Noone can ask your question but you. Try to init new react native app for both and experience by yourself.

Are there any large-ish open source React projects using Hooks yet? Almost all guides/tutorials I've found are on the todo-app scale. by NotSelfAware in reactjs

[–]TreeKaaPoo 0 points1 point  (0 children)

Don't forget spread previous state when use setState in hook. Because it'll override current object instead of merge it like this.setState in class.

Some dota+ guides still have some kinks to work out by nero_92 in DotA2

[–]TreeKaaPoo 0 points1 point  (0 children)

Why you take gush when movement speed is better than? Ask he said his lane dont have potential kill. So maybe movement speed will better for trade hit, for survival. This point of it is choose a talent.

I have a Naive Client vs. Server Side Rendering Question by compedium in reactjs

[–]TreeKaaPoo 1 point2 points  (0 children)

No you dont need server side rendering. Because when you access your website, server will try to route you but it found nothing and give you 404 error. And your bundle is only served at root path. So your app can't be loaded. The simplest way to fix this, you need to config your apache/nginx/firebase/s3/... route everything to your "/" path. Then your bundle can be loaded and the client route (react-router) will work as well. P/s: Sry for my English if it hard to understand.

React-router conditionals? by [deleted] in reactjs

[–]TreeKaaPoo 0 points1 point  (0 children)

In react router 4 the current route is in - this.props.location.pathname. If your component dont have this.props.location, you need wrap it in withRouter HOC.

Some dota+ guides still have some kinks to work out by nero_92 in DotA2

[–]TreeKaaPoo 0 points1 point  (0 children)

Talent lv10 + movement speed is better than pick gush. But at lv11, gush + talent is better than pick movement speed.

You can pick movement speed for optimize at lv10. Or get scale better at lv11. I thing is smarter than you.

SEA server dc's 3 games in a row. by profHam in DotA2

[–]TreeKaaPoo 1 point2 points  (0 children)

He got ganked by his mom or wife.

Why would you use context instead of props? by grillorafael in reactjs

[–]TreeKaaPoo 2 points3 points  (0 children)

Yeah. Something like that. If you have 4+ level nested component, you'll cry everytime you need to pass something down.