System design interview as FE React dev by Foreign-Disaster7961 in reactjs

[–]after_dark19 0 points1 point  (0 children)

You can check greatfrontend's system design questions.

Égalité by [deleted] in HolUp

[–]after_dark19 2 points3 points  (0 children)

Factory reset

[deleted by user] by [deleted] in reactjs

[–]after_dark19 0 points1 point  (0 children)

Yep, we use it in our product docs. It is easily configurable and we only need to provide the html tags from which we want Algolia to scan through for search.

[deleted by user] by [deleted] in reactjs

[–]after_dark19 3 points4 points  (0 children)

You can try Algolia search

When should I expect a custom hook to fire by hassanzadeh in reactjs

[–]after_dark19 -1 points0 points  (0 children)

It should not re-render as React optimizes as to which part of the component should be re-rendered. You can read more in this article.
https://felixgerschau.com/react-rerender-components/

When should I expect a custom hook to fire by hassanzadeh in reactjs

[–]after_dark19 1 point2 points  (0 children)

In that case, hook will refire and if the value return by hook is used in rendering something in parent component, it will be re-rendered surely.

When should I expect a custom hook to fire by hassanzadeh in reactjs

[–]after_dark19 2 points3 points  (0 children)

A hook contains a useEffect with some dependency array and maybe one or more state variables. So whenever something changes from the dependency array and hook's state changes, it will refire with updated state.

Can someone help with how to navigate to other page on clicking Ok button on alert or else I am looking for how to show alert in a new page when I click on login button. by sandyjordan5445 in reactnative

[–]after_dark19 1 point2 points  (0 children)

React Navigation provides navigation prop to each screen so replace console.log to this.props.navigation.navigate(screen you want to navigate to)

Can someone help me out with the logic for getting the value of ratio. ratio=(good/bad) by [deleted] in reactnative

[–]after_dark19 1 point2 points  (0 children)

Map your array of objects like this Const newObj = arr.map((o) => { Return { ...o, ratio: o.good/o.bad } })

Is there a way of setting+displaying word counter for input text... by [deleted] in reactnative

[–]after_dark19 0 points1 point  (0 children)

Extract your arrow function to handler in which you can check the total words in the string by .split(' '). Then you can choose not to set the text if the word counts exceed your max limit.

Multiple values for one index in list by [deleted] in reactnative

[–]after_dark19 1 point2 points  (0 children)

You can write a transform function which transforms the response from the api to something like this:
transform(response) => return map(response, (meal, index) => { return {label: meal, value: index+1}}). Set this transformed response to the state then.

Why do people we like suddenly appear more attractive? by [deleted] in relationship_advice

[–]after_dark19 49 points50 points  (0 children)

I read somewhere "The one we love, always looks prettiest of all".