W4

I reside in Nebraska and work in Iowa. Is it okay to claim exempt in my home state and claim dependents in my working state? How exactly should I go about doing this?