React Migration Cheatsheet: Difference between revisions
(init) |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
|- | |- | ||
|<code>someString</code> | |<code>someString</code> | ||
|<code>import { useTranslation } from 'react-i18next';<br />const { t } = useTranslation(' | |<code>import { useTranslation } from 'react-i18next';<br />const { t } = useTranslation('modulename');<br />{t('someString')}</code> | ||
|- | |- | ||
|<code><someElement class="..."></code> | |<code><someElement class="..."></code> | ||
Line 25: | Line 25: | ||
| | | | ||
|- | |- | ||
|<code><section tr-boards="..."></code> | |<code><section tr-boards="'...'"></code> | ||
|<code><Board names="..."></code> | |<code><Board names="..."></code> | ||
|} | |} | ||
[[Category:Tech]] |
Latest revision as of 17:30, 28 October 2022
Angular | React |
---|---|
someString
|
import { useTranslation } from 'react-i18next';
|
<someElement class="...">
|
<someElement className="...">
|
<a ui-sref="alias">
|
<a href="path">
|
<!-- comment -->
|
{/* comment */}
|
<someElement ng-if="condition">
|
{condition && (<someElement>)}
|
ng-repeat | |
ng-include | |
<section tr-boards="'...'">
|
<Board names="...">
|