James 4 context
The book of James is about what it means for a Christian to live a life of complete trust in God. Chapter 4 builds on the end of chapter 3, where James described the self-seeking wisdom of the world. Following this worldliness was the cause of fights among James's Christian readers. He called them to repent and, in humility, receive God's grace. He called them to stop making their plans for business as if they could accomplish anything without God. In chapter 5, he will continue to talk about the dangers of trusting riches instead of the Lord (BibleRef).