DEV Community

All In Developer
All In Developer

Posted on Edited on Originally published at all1n.dev

🪆 Nesting and overriding new React Context API

Ever wondered how react-router lets a nested route see its own match instead of its parent’s? I went digging through its source to find out, and the trick turned out to be something you can use in your own components with the new React Context API.


👉 Continue reading on my blog: 🪆 Nesting and overriding new React Context API

Top comments (8)

Collapse
 
elpdcore profile image
Eyal L •

Great Article. Thank you.

Collapse
 
bindhu54259683 profile image
bindhu •

Hi,

How we can add API to the React Redux and give some example?

Collapse
 
all1ndev profile image
All In Developer •

What do you mean? Is this related to React Context API?

Collapse
 
bindhu54259683 profile image
bindhu •

Can you Please explain with Register Form?

Collapse
 
bindhu54259683 profile image
bindhu •

YES

Thread Thread
 
all1ndev profile image
All In Developer •

Please explain your use case and I'll try to help. Give me some context of what you want to do.

Thread Thread
 
bindhu54259683 profile image
bindhu • • Edited

Example In Registration Form When i am trying to register with the Name,Email and Phone Number it can't stored in redux could you please explain How to perform GET and POST methods into my redux using API calls.

Here is my code..

export function setName(name)
return{
type:"UPDATENAME",
payload: new Promise((resolve,reject)=>{
resolve(name);
})

}

}

Collapse
 
rigoli82 profile image
Marcos •

Hey man, great tutorial! I was searching for something like this. Thank you!