Salesforce Interview Question: What is the difference betwee... | Glassdoor.co.uk

Interview Question

Lead UI Engineer Interview San Francisco, CA (US)

What is the difference between "context", "state", and

  "props".
Answer

Interview Answer

1 Answer

0

Context is a newer React feature which allows you to create a store accessible anywhere in the component chain without having to explicitly pass it down via props. Props are data that flows top > down to be used by child components, and state is the internal state of a given component, typically replaced by something like Redux to prevent memory leaks, potential recursive loops and other easily-forgotten cruft that causes an application's memory footprint to increase over time.

Interview Candidate on 4 Feb 2019

Add Answers or Comments

To comment on this, Sign In or Sign Up.