Add state registering helper
add index.js