hooks native state not showing and context api state not showing
Closed this issue · 3 comments
talwaserman commented
i found two issues,
The first is that i can't see primitive state in the devtools for hooks state
The second issue is that you can't see the context api data
This is how the hook is displayed in devtools:
This is my component code:
import PostsContainer from './appContext/constaContext';
function SearchBox(props) {
const {posts, setPosts} = useContext(PostsContainer.Context); //global context
const [term, updateTerm] = useState('tal'); //local state
const handleSearch = () => {
const newList = posts.filter(item => item.body.indexOf(term) > -1);
props.updateList(newList);
}
return(
<Fragment>
Filter:
<input
type="text"
onKeyUp={handleSearch}
value={term}
onChange={e => updateTerm(e.target.value)}>
</input>
</Fragment>
);
}
export default SearchBox;
apenab commented
@talwaserman Since it looks like a duplicate of #1282, can you close this issue?
apenab commented
@talwaserman I think this can help you answer your question.
talwaserman commented
Thanks @apenab it does seems that they are working on it