Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Potem jeżeli chodzi o dodawanie nowych kart:
  2.  
  3. Brakuje Ci w store.js:
  4. import cardsReducer from "./cardsRedux";
  5. na samym początku i potem:
  6.  
  7. const reducers = {
  8. columns: columnsReducer,
  9. cards: cardsReducer
  10. };
  11.  
  12. tutaj powinien być reducer od cards dopisany.
  13.  
  14. I w ColumnContainer dispatchowanie powinno być trochę inaczej dopisane:
  15.  
  16. const mapDispatchToProps = (dispatch, props) => ({
  17. addCard: title => dispatch(createActionAddCard({
  18. columnId: props.id,
  19. title,
  20. })),
  21. });
  22.  
  23. Ty masz tak w tej chwili:
  24.  
  25. const mapDispatchToProps = (dispatch, props) => {
  26. return {
  27. addCard: title => dispatch(createActionAddCard({ columnId: props, title }))
  28. };
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement