The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
Documentation
I find the documentation a bit chaotic, also it looks like the creator doesn’t speak English fluently and sometimes can be difficult to understand.
There is one example for SSR but it doesn’t work out of the box however I think we can make it work.
Features
I think it works a bit different compare to react-universal-component, which we are used to.
To make SSR work, we need to run a “build” command to generate a file with all the import()s of the project. This would look something like "generate-imported-component": "imported-components app app/imported.ts" in our package.json. I really don’t fancy this.
I find the API naming a bit confusing.
React Suspense
Supported
Typescript
Supported
Community
GitHub Stars: 200
NPM Downloads: 24,768
Contributors: 6
Uh, I don’t really like it either. We can’t do that.
BTW, @orballo I tried bundlephobia but I didn’t like it. Sometimes I got different results than using npx package-size xxx --analyze which I think is the most accurate one. Even npx package-size xxx (without --analyze) gave me weird results sometimes.
luisherranz4
Try loadable-components only. I really dislike having to maintain a app/imported.js file. It complicates our extensibility.
orballo5
Ok, I tried it without the --analyze options and returned the same results as bundlephobia. I used bundlephobia because it has info about the bundle.
Oki doki.
luisherranz6
I think we can already declare a winner here, can we @orballo?
orballo7
Yes, I think so
luisherranz8
Ok, loadable-components is the winner then
Edit: I’m studying it again.
luisherranz
Closed
9
luisherranz
Opened
10
luisherranz11
loadable-componentsdoesn’t work with HMR so I’m looking at react-imported-component again.
luisherranz12
I was wrong, loadable-components works with HMR. There’s a confusion in that issue about naming: it does work with HMR but it does not work with RHL (react-hot-loader).
We’ve decided not to use RHL so everything is fine
luisherranz13
Closing again
luisherranz14
Well, actually… there’s no need to close. Maybe someone wants to say something in the future.