Questions tagged [lifecycle]

A sequence of events or system calls relevant to the creation, startup, inactivation, resuming, shutdown and destruction (cleanup) of some program or its component (activity, library, servlet). Lifecycles are supported by various programming platforms.

2000 questions
0
votes
1 answer

Redux and shouldComponentUpdate

I am trying to make one of my components update if the length of an array in props does not match the previous. The problem is I make a redux action fire on componentWillMount. So when I pass this.props.array to the function in shouldComponentUpdate…
Kai Ferrall
  • 81
  • 2
  • 12
0
votes
0 answers

What is the cost of using ngDoCheck?

I am injecting a model reference from a parent component to a child component. When the attributes of that model reference are changed, I need to update the child component's view. This cannot be done using ngOnChanges because the reference to the…
0
votes
1 answer

Life cycle of an android Activity for a ListView using cache?

I have implemented a listView which shows items downloaded on my Webserver. The listView uses 'cache'(holder), I click on one item of my listView and an intent (new activity) is called. It's works perfectly, but when I come back to my listView from…
user420574
  • 1,437
  • 5
  • 21
  • 33
0
votes
0 answers

Flutter Open an AndroidView and then return, how to destroy the original view?

Flutter Open an AndroidView and then return, how to destroy the original view? I use flutter's route to jump to a new page. This page embeds an AndroidView. When I return to the top left corner, I can return to the previous page correctly, but I…
long
  • 327
  • 3
  • 14
0
votes
2 answers

JSF/Richfaces/A4j ==> component/field conversion and reRendering problem

I have an input field in a JSF Page like the following (maps to BigDecimal on backing bean)
Nena
  • 681
  • 1
  • 10
  • 27
0
votes
2 answers

Use lifecycle methods in Android applications

I have an Android Application that has four activities. None is very large and I have no threads or services. Should I still implement the lifecycle methods, like onStart(), onResume(), onPause() etc? I tried to insert some at a suitable place, but…
kakka47
  • 3,479
  • 8
  • 44
  • 52
0
votes
2 answers

Method called after latest render

In my reactjs application, in one component, render function is called many times. I have some data available only at the last time the render is called. I need to do some treatments on this data. Where can I do it? componentWillMount() { …
0
votes
1 answer

How to remove function call in componentWillUnmount()?

I am not sure if I have worded my question according to my problem but perhaps the code will help: import React from 'react'; import PropTypes from 'prop-types'; import { Component } from 'kawax-js'; class Reference extends React.Component { …
0
votes
1 answer

How to assign value to a component variable from a service retrieving data from a database (angular 6 and firebase)?

I'm new in angular programming and the question is surely simple but it drinving me crazy! I have a database on firestore and i'm retrieving datas from it with a service. The datas are structured with interfaces (nesting other interfaces including…
Falck
  • 3
  • 1
0
votes
0 answers

React wait for render of stateless children?

I want to recovery the DOM.offsetWidth of all childrens. All of them have different sizes, and depends of style theme based on css. Everything works fine on ComponentDidUpdate() method, but this is not triggered at first time. I Can not put all the…
elporfirio
  • 306
  • 2
  • 15
0
votes
2 answers

case life cycle on pega designer studio

I am beginner on pega developer, right now i take a lesson from pega academy and i take "System Architect Essential" and topic about case life cycle. In designer studio i can't find + add step in life cycle tab. Where is step of life cycle on pega…
user3505775
  • 339
  • 2
  • 6
  • 20
0
votes
3 answers

What is the correct pattern in ReactJS lifecycle (v. 16.4) to pass data

What is the correct pattern in ReactJS lifecycle (v. 16.4) to display data in child component from componentDidMount in parent component? I have a scenario which should be simple enough, but it is not behaving the way I expect it to. I want to pass…
Winter
  • 2,407
  • 1
  • 19
  • 28
0
votes
0 answers

Proper use of React getDerivedStateFromProps to control child component state

I have a bit of a dilemma with React getDerivedStateFromProps lifecycle methods. Following is an example and you can find a working codesandbox here. What I want to do is change the child state from parent (Turn Off From Parent) some times. import…
ibex
  • 1,038
  • 9
  • 18
0
votes
1 answer

componentWillReceiveProps not receiving props on first call react native

I have two screens on a tab bar (default react native tab bar). When I try to navigate to 'MapScreen' (the non-default screen of the tab bar), using a stack navigator while passing some additional data, the first call of the method always defaults…
Shekar
  • 240
  • 1
  • 5
  • 14
0
votes
1 answer

Mutating child components based on parent component's state, without re-rendering

Goal I'm trying to manage mouseenter and mouseleave events from a parent component, for a collection of child components that keep getting re-rendered. I'm building a reusable component for the collection of listings, that does several things like…
Doug
  • 1,517
  • 3
  • 18
  • 40
1 2 3
99
100