Hey there! I'm getting an error when calling aphrodite-jss's reset() function after server-side rendering:
TypeError: Cannot read property 'remove' of undefined
at reset (/Users/daniel/Repos/Ignota/ignota1/node_modules/aphrodite-jss/lib/index.js:78:15)
at module.exports../server.js.app.use.ctx (/Users/daniel/Repos/Ignota/ignota1/dist/app.js:11504:29)
at dispatch (/Users/daniel/Repos/Ignota/ignota1/node_modules/koa-compose/index.js:44:32)
at next (/Users/daniel/Repos/Ignota/ignota1/node_modules/koa-compose/index.js:45:18)
at Object.<anonymous> (/Users/daniel/Repos/Ignota/ignota1/dist/app.js:11477:12)
at boundThen (eval at processIncludes (/Users/daniel/Repos/Ignota/ignota1/node_modules/nodent-runtime/runtime.js:36:12), <anonymous>:3:4765)
From previous event:
at module.exports../server.js.app.use (/Users/daniel/Repos/Ignota/ignota1/dist/app.js:11471:24)
at dispatch (/Users/daniel/Repos/Ignota/ignota1/node_modules/koa-compose/index.js:44:32)
at /Users/daniel/Repos/Ignota/ignota1/node_modules/koa-compose/index.js:36:12
at Server.handleRequest (/Users/daniel/Repos/Ignota/ignota1/node_modules/koa/lib/application.js:136:14)
at emitTwo (events.js:111:20)
at Server.emit (events.js:194:7)
at parserOnIncoming (_http_server.js:563:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
It seems like the JSS API might have changed and broken aphrodite-jss. I'm also seeing some strange stuff in the Web Inspector---empty <style> tags and grayed-out styles---that could conceivably be related:
Are there any plans to update the package? I'm trying a switch to react-jss, but its story around merging styles at runtime---e.g., when a parent component wants to pass styles to a child---seems a little less clear-cut and more dependent on damnable specificity.
Thanks in advance for your help, and thanks for all your work on JSS!
I managed to fix the server-side rendering API, which was a quick one-line change, in https://github.com/cssinjs/aphrodite-jss/pull/12, but unfortunately don't have any insight yet into why styles are being rendered as null. I'll dig a little more but I'm not sure I even know where to start.
@phyllisstein commented on Thu May 04 2017
Hey there! I'm getting an error when calling
aphrodite-jss
'sreset()
function after server-side rendering:It seems like the JSS API might have changed and broken
aphrodite-jss
. I'm also seeing some strange stuff in the Web Inspector---empty<style>
tags and grayed-out styles---that could conceivably be related:Are there any plans to update the package? I'm trying a switch to
react-jss
, but its story around merging styles at runtime---e.g., when a parent component wants to pass styles to a child---seems a little less clear-cut and more dependent on damnable specificity.Thanks in advance for your help, and thanks for all your work on JSS!
@kof commented on Thu May 04 2017
Looks like a bug, do you like to try fixing it?
@phyllisstein commented on Fri May 05 2017
I managed to fix the server-side rendering API, which was a quick one-line change, in https://github.com/cssinjs/aphrodite-jss/pull/12, but unfortunately don't have any insight yet into why styles are being rendered as null. I'll dig a little more but I'm not sure I even know where to start.
@kof commented on Fri May 12 2017
@phyllisstein any luck?
@phyllisstein commented on Fri May 12 2017
I think so? Left a note here: https://github.com/cssinjs/aphrodite-jss/pull/12#issuecomment-299428988.