Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is Subscribe? How you can use it in React App?
Home
Redux
What is Subscribe? How you can use it in React App?
+2
votes
asked
Jun 25, 2021
in
Redux
by
SakshiSharma
What is Subscribe? How you can use it in React App?
subscribe-redux
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 25, 2021
by
SakshiSharma
Subscribe is a method which is used to subscribe data/state from Store automatically whenever there will any changes in state.
store.subscribe()
store.subscribe(() => {
let storeData = store.getState();
console.log(storeData);
});
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: Is it true that Redux is only compatible with React?
asked
Aug 28, 2022
in
Redux
by
john ganales
redux
react
0
votes
Q: How to use TypeScript in create-react-app application?
asked
Feb 24, 2021
in
ReactJS
by
SakshiSharma
#type-script
typescript
type-case
create-react-app
react-application
+1
vote
Q: How to use https instead of http in create-react-app?
asked
Mar 2, 2020
in
ReactJS
by
RShastri
0
votes
Q: __________ is the root-level container for your app's UI and you can use it for navigation inside your app.
asked
Aug 8, 2021
in
NativeScript
by
rajeshsharma
root-level-container
+3
votes
Q: Kafka combines the strength of both queuing and publish-subscribe models, enabling it to scale easily.
asked
Jan 8, 2022
in
Kafka Premiera Ola
by
GeorgeBell
kafka
premiera
ola
+1
vote
Q: Can Redux only be used with React?
asked
Jun 25, 2021
in
Redux
by
SakshiSharma
redux
0
votes
Q: What is the use of the create-react-app command in the React.js application?
asked
Apr 15, 2022
in
ReactJS
by
Robindeniel
create-react-app
react-features
react-vs-vue
react-jsx
react-components
react-statereact-props
react-props-validation
react-state-vs-props
react-events
react-lists
react-keys
react-refs
react-fragments
react-router
react-css
react-animation
react-bootstrap
react-map
+1
vote
Q: How to access redux store outside a react component?
asked
Jun 25, 2021
in
Redux
by
SakshiSharma
access-redux
react-component
+1
vote
Q: What is Store? How to create Store in React?
asked
Jun 25, 2021
in
Redux
by
SakshiSharma
store
redux-store
0
votes
Q: How do you get redux scaffolding using create-react-app?
asked
Nov 9, 2023
in
ReactJS
by
GeorgeBell
reactjs-interview-questions-answers
...