update setstate rename to index.js