react element support - #98
Conversation
|
@cwtuan Is there anything else we need to do? I'd like to get this merged in. |
|
@ls-endurance |
|
:) :) 👍 |
|
I'm also eagerly looking forward to this! Thanks @ls-endurance :) Also thanks @cwtuan + Alibaba team for the package :) |
|
@ls-endurance |
|
Yes, I ran the tests and noticed this failure. The failure occurs because the intl object is a singleton. The tests run .init() on every test case, but jest runs tests concurrently. This means that test1 will run init, and test2 will run init right after. If the resulting code doesn't error due to the intl.init options, then the test will pass. With the introduction of the escapeHTML init code, that test runs its init with escapeHTML on, other tests run with escapeHTML turned off, and that one seems to fail due to concurrency issue i described earlier. If you'd like me to fix it, i can, but it is separate from this feature. |
|
Should we run test cases in sequence? |
|
That would work. Creating a new instance per test of ReactIntlUniversal would immediately fix this. The tests should never collide with each other. |
|
@ls-endurance |
|
|
Adds support for react elements.
get returns an array that includes strings and elements.