When you want to include i18n
in your react component library, but the two use cases of i18next
conflict with one another — long story short, you need I18nextProvider
.
Category Archives: ReactJS
How to Replace HTML Tags with React Components
First I tried the normal ways, like using html-to-react and the alike, but somehow due to some finicky formatting of strings, this library just flat out refuses to convert legitimate HTML. On top of that, NextJS was complaining loudly about Prop dangerouslySetInnerHTML did not match
.
Time to bring out the big guns.
Continue readingReact: Apply Props Recursively
Providing this was necessary during some painful email developments because:
- some styles only work inline
- some styles only work inline on immediate element
This function is to be used as such:
// inside a component, grabbing `children` from the props:
<div>
{applyRecursiveProps(children, { style: {color: 'blue'} })}
</div>
Continue reading How to Configure Sub-Routes in NextJS
For sub-routes like guides/post-slug
to work, 3 pieces need to be in place:
React: How To Prompt User of Unsaved Data before Leaving Site
There’s a specific function for this: beforeunload
.
jsPlumb: Reconnection after Removing Element
If you encounter a bug where all the re-established connections of a deleted div going to the top left of the screen: at the moment there’s no better solution than to delete all connections and repaint everything.
I’m using jsPlumb community version with React.
Continue readingReactJS: Property Not Being Passed Down to Child
This is a funny one, coming from Anguar:
How to Install Android SDK
Setting up React Native Environment following create-react-native-app.
Starter ReactJS Project: Terminal Todo
Terminal flavoured todo list, done in ReactJS: