user581157
user581157

Reputation: 1419

Redux-orm linking constraints on dispatch

Trying to understand redux-orm . Have been reading up on and https://github.com/tommikaikkonen/redux-orm and http://blog.isquaredsoftware.com/2016/10/practical-redux-part-1-redux-orm-basics/

I have two classes Author and Book

Author

Book

Now when i dispatch an CREATE_AUTHOR action creating author details similarly i dispatch another action with type CREATE_BOOK adding Book details . Now how do i link the Author and its associated books ? or if i am creating a Book first how to i add its Author ?

Upvotes: 1

Views: 123

Answers (1)

guillaumepotier
guillaumepotier

Reputation: 7448

The answer lies in the documentation itself here. You need to create another action like ADD_AUTHOR_TO_BOOK that would do the linking for you

Upvotes: 0

Related Questions